mirror of
https://github.com/ApfelTeeSaft/reactos.git
synced 2026-08-31 12:23:31 +00:00
* Get rid of a hack-based heap allocation in FreeLdr, which makes real data interleaved with temporary data, all that unfreeable and unmanageable. * Introduce new APIs MmHeapAlloc / MmHeapFree to alloc/free memory from a pre-allocated heap. * Add BGET (public domain heap implementation), hook it up to the MmHeapAlloc / MmHeapFree APIs. * MmAllocateMemory still is a backward-compatibility API, will be removed soon. - Change most of allocations to the heap-based routines, add frees where necessary (I must admit Brian already used MmFreeMemory in a lot of places, so I just had to change those to the corresponding MmHeapFree API). - Remove unneeded and wrong IDT filling, which was commented out. - Temporary disable caching support, because it needs a standalone place to keep its data in. For compatibility's sake it's better to leave it when WinLdr is more mature. svn path=/branches/winldr/; revision=29518
31 lines
1003 B
C
31 lines
1003 B
C
/*
|
|
|
|
Interface definitions for bget.c, the memory management package.
|
|
|
|
*/
|
|
|
|
#ifndef _
|
|
#ifdef PROTOTYPES
|
|
#define _(x) x /* If compiler knows prototypes */
|
|
#else
|
|
#define _(x) () /* It it doesn't */
|
|
#endif /* PROTOTYPES */
|
|
#endif
|
|
|
|
typedef long bufsize;
|
|
void bpool _((void *buffer, bufsize len));
|
|
void *bget _((bufsize size));
|
|
void *bgetz _((bufsize size));
|
|
void *bgetr _((void *buffer, bufsize newsize));
|
|
void brel _((void *buf));
|
|
void bectl _((int (*compact)(bufsize sizereq, int sequence),
|
|
void *(*acquire)(bufsize size),
|
|
void (*release)(void *buf), bufsize pool_incr));
|
|
void bstats _((bufsize *curalloc, bufsize *totfree, bufsize *maxfree,
|
|
long *nget, long *nrel));
|
|
void bstatse _((bufsize *pool_incr, long *npool, long *npget,
|
|
long *nprel, long *ndget, long *ndrel));
|
|
void bufdump _((void *buf));
|
|
void bpoold _((void *pool, int dumpalloc, int dumpfree));
|
|
int bpoolv _((void *pool));
|