Changeset View
Changeset View
Standalone View
Standalone View
sys/sys/malloc.h
Show First 20 Lines • Show All 46 Lines • ▼ Show 20 Lines | |||||
#include <sys/_mutex.h> | #include <sys/_mutex.h> | ||||
#include <machine/_limits.h> | #include <machine/_limits.h> | ||||
#define MINALLOCSIZE UMA_SMALLEST_UNIT | #define MINALLOCSIZE UMA_SMALLEST_UNIT | ||||
/* | /* | ||||
* Flags to memory allocation functions. | * Flags to memory allocation functions. | ||||
*/ | */ | ||||
#define M_NOWAIT 0x0001 /* do not block */ | #define M_NOWAIT 0x0001 /* do not block */ | ||||
kib: I think it is time to use 8 digits for M_ constants. Or use the flags from low byte, they are… | |||||
#define M_WAITOK 0x0002 /* ok to block */ | #define M_WAITOK 0x0002 /* ok to block */ | ||||
#define M_NORECLAIM 0x0080 /* do not reclaim after failure */ | |||||
#define M_ZERO 0x0100 /* bzero the allocation */ | #define M_ZERO 0x0100 /* bzero the allocation */ | ||||
#define M_NOVM 0x0200 /* don't ask VM for pages */ | #define M_NOVM 0x0200 /* don't ask VM for pages */ | ||||
#define M_USE_RESERVE 0x0400 /* can alloc out of reserve memory */ | #define M_USE_RESERVE 0x0400 /* can alloc out of reserve memory */ | ||||
#define M_NODUMP 0x0800 /* don't dump pages in this allocation */ | #define M_NODUMP 0x0800 /* don't dump pages in this allocation */ | ||||
#define M_FIRSTFIT 0x1000 /* only for vmem, fast fit */ | #define M_FIRSTFIT 0x1000 /* only for vmem, fast fit */ | ||||
#define M_BESTFIT 0x2000 /* only for vmem, low fragmentation */ | #define M_BESTFIT 0x2000 /* only for vmem, low fragmentation */ | ||||
#define M_EXEC 0x4000 /* allocate executable space */ | #define M_EXEC 0x4000 /* allocate executable space */ | ||||
#define M_NEXTFIT 0x8000 /* only for vmem, follow cursor */ | #define M_NEXTFIT 0x8000 /* only for vmem, follow cursor */ | ||||
▲ Show 20 Lines • Show All 251 Lines • Show Last 20 Lines |
I think it is time to use 8 digits for M_ constants. Or use the flags from low byte, they are available I believe.