add map_anonymoys support

This commit is contained in:
Anthony Minessale committed 2015-09-04 11:38:16 -05:00
1 parent aebc6467fb
commit b434e2b7fe
3 files changed
+19 -6

No files matched your search

+5
View File
@@ -66,6 +66,11 @@
*/
#define MPOOL_FLAG_USE_SBRK (1<<3)
/*
* Use MMAP_ANONYMOUS instead of /dev/zero
*/
#define MPOOL_FLAG_ANONYMOUS (1<<4)
/*
* Mpool error codes
*/
+1
View File
@@ -73,6 +73,7 @@
typedef struct {
unsigned int mp_magic; /* magic number for struct */
unsigned int mp_flags; /* flags for the struct */
unsigned int mp_mmflags; /* flags for mmap */
unsigned long mp_alloc_c; /* number of allocations */
unsigned long mp_user_alloc; /* user bytes allocated */
unsigned long mp_max_alloc; /* maximum user bytes allocated */