34 #ifndef _USER_MALLOC_H_ 35 #define _USER_MALLOC_H_ 39 #include <sys/types.h> 40 #if !defined (__Userspace_os_Windows) 44 #if defined(_MSC_VER) && _MSC_VER >= 1600 46 #elif defined(SCTP_STDINT_INCLUDE) 47 #include SCTP_STDINT_INCLUDE 49 #define uint32_t unsigned __int32 50 #define uint64_t unsigned __int64 55 #define MINALLOCSIZE UMA_SMALLEST_UNIT 60 #define M_NOWAIT 0x0001 61 #define M_WAITOK 0x0002 64 #define M_USE_RESERVE 0x0400 66 #define M_MAGIC 877983977 130 struct witness *_lo_witness;
142 #define MALLOC_TYPE_STREAM_VERSION 0x00000001 150 #define MALLOC_MAX_NAME 32 169 #define MALLOC_DEFINE(type, shortdesc, longdesc) \ 170 struct malloc_type type[1] = { \ 171 { NULL, 0, 0, 0, 0, 0, M_MAGIC, shortdesc, NULL, NULL, \ 172 NULL, 0, NULL, NULL, 0, 0 } \ 188 #define MALLOC_DECLARE(type) \ 189 extern struct malloc_type type[1] 191 #define FREE(addr, type) free((addr)) 195 #define MALLOC(space, cast, size, type, flags) \ 196 ((space) = (cast)malloc((u_long)(size))); \ 198 if (flags & M_ZERO) { \ 199 memset(space,0,size); \ 208 #define MALLOC_DEFINE(type, shortdesc, longdesc) \ 209 struct malloc_type type[1] = { \ 210 { NULL, 0, 0, 0, 0, 0, M_MAGIC, shortdesc, NULL, NULL, \ 211 NULL, 0, NULL, NULL, 0, 0 } \ 213 SYSINIT(type##_init, SI_SUB_KMEM, SI_ORDER_SECOND, malloc_init, \ 215 SYSUNINIT(type##_uninit, SI_SUB_KMEM, SI_ORDER_ANY, \ 219 #define MALLOC_DECLARE(type) \ 220 extern struct malloc_type type[1] 232 #define MALLOC(space, cast, size, type, flags) \ 233 ((space) = (cast)malloc((u_long)(size), (type), (flags))) 234 #define FREE(addr, type) free((addr), (type)) 243 extern struct mtx malloc_mtx;
248 vm_paddr_t
low, vm_paddr_t
high,
unsigned long alignment,
249 unsigned long boundary);
252 void malloc_init(
void *);
253 int malloc_last_fail(
void);
256 void malloc_uninit(
void *);
Definition: TestObj.idl:46
EGLStreamKHR EGLint EGLint EGLint size
Definition: eglext.h:984
unsigned long long uint64_t
Definition: ptypes.h:120
u_long _ks_size
Definition: user_malloc.h:112
unsigned int uint32_t
Definition: ptypes.h:105
uint64_t mts_size
Definition: user_malloc.h:89
const char * _lo_name
Definition: user_malloc.h:126
uintptr_t _mtx_lock
Definition: user_malloc.h:131
uint64_t _mts_reserved2
Definition: user_malloc.h:91
Definition: TestObj.idl:46
uint64_t mts_memalloced
Definition: user_malloc.h:85
uint64_t mts_memfreed
Definition: user_malloc.h:86
u_int _mtx_recurse
Definition: user_malloc.h:132
u_long ks_magic
Definition: user_malloc.h:116
u_long _ks_memuse
Definition: user_malloc.h:111
#define MALLOC_MAX_NAME
Definition: user_malloc.h:150
#define MALLOC_DECLARE(type)
Definition: user_malloc.h:188
_W64 unsigned int uintptr_t
Definition: stdint.h:161
uint64_t mts_numallocs
Definition: user_malloc.h:87
uint64_t _mts_reserved3
Definition: user_malloc.h:92
uint64_t mts_numfrees
Definition: user_malloc.h:88
#define malloc
Definition: mbmalloc.h:49
EGLenum type
Definition: eglext.h:63
Definition: user_malloc.h:109
const char * ks_shortdesc
Definition: user_malloc.h:117
const char * _lo_type
Definition: user_malloc.h:127
Definition: user_malloc.h:99
Definition: sctp_os_userspace.h:427
void * ks_handle
Definition: user_malloc.h:125
#define MAXCPU
Definition: user_malloc.h:96
uint64_t _mts_reserved1
Definition: user_malloc.h:90
#define free
Definition: mbmalloc.h:50
Definition: user_malloc.h:84
u_int _lo_flags
Definition: user_malloc.h:128
#define realloc
Definition: mbmalloc.h:51
uint64_t _ks_calls
Definition: user_malloc.h:114
Definition: bwe_rtp.cc:26
u_long _ks_inuse
Definition: user_malloc.h:113
struct malloc_type * ks_next
Definition: user_malloc.h:110
u_long _ks_maxused
Definition: user_malloc.h:115
void * _lo_list_next
Definition: user_malloc.h:129