Logo Search packages:      
Sourcecode: virtualbox-ose version File versions  Download package

kHlpBareHeap.c File Reference


Detailed Description

kHlpBare - Heap.

Definition in file kHlpBareHeap.c.

#include <k/kHlpAlloc.h>
#include <k/kHlpString.h>
#include <k/kHlpAssert.h>
#include <os2.h>

Go to the source code of this file.

Classes

struct  KHLPHEAPANCHOR
struct  KHLPHEAPBLOCK
struct  KHLPHEAPFREE
struct  KHLPHEAPSEG
struct  KHLPHEAPSEGS

Defines

#define INCL_BASE
#define INCL_ERRORS
#define KHLPHEAP_ASSERT(expr)   kHlpAssert(expr)
#define KHLPHEAP_ASSERT_BLOCK(pHeap, pBlock)
#define KHLPHEAP_ASSERT_FREE(pHeap, pFree)
#define KHLPHEAP_STRICT
#define KHLPHEAPBLOCK_ALIGNMENT   sizeof(KHLPHEAPBLOCK)
#define KHLPHEAPBLOCK_FLAG_FREE   ((KSIZE)1)
#define KHLPHEAPBLOCK_FLAG_MASK   ((KSIZE)1)
#define KHLPHEAPBLOCK_IS_ADJACENT(pB1, pB2)   ( ((KUPTR)(pB1) + (pB1)->cb) == (KUPTR)(pB2) )
#define KHLPHEAPBLOCK_IS_ALLOCATED(pB)   !KHLPHEAPBLOCK_IS_FREE(pB)
#define KHLPHEAPBLOCK_IS_FREE(pB)   ( (pB)->fFlags & KHLPHEAPBLOCK_FLAG_FREE )

Typedefs

typedef struct KHLPHEAPANCHORPKHLPHEAPANCHOR
typedef struct KHLPHEAPBLOCKPKHLPHEAPBLOCK
typedef struct KHLPHEAPFREEPKHLPHEAPFREE
typedef struct KHLPHEAPSEGPKHLPHEAPSEG
typedef struct KHLPHEAPSEGSPKHLPHEAPSEGS

Functions

 KHLP_DECL (char *)
 KHLP_DECL (void *)
 KHLP_DECL (void)
 KHLP_DECL (int)
static void * khlpHeapAlloc (PKHLPHEAPANCHOR pHeap, KSIZE cb)
static KSIZE khlpHeapBlockSize (PKHLPHEAPANCHOR pHeap, void *pv)
static void khlpHeapDelete (PKHLPHEAPANCHOR pHeap)
static void khlpHeapDonate (PKHLPHEAPANCHOR pHeap, void *pv, KSIZE cb)
static void khlpHeapFree (PKHLPHEAPANCHOR pHeap, void *pv)
static int khlpHeapInit (PKHLPHEAPANCHOR pHeap)
static int khlpHeapSegAlloc (PKHLPHEAPSEG pSeg, KSIZE cb)
static void khlpHeapSegFree (PKHLPHEAPSEG pSeg)
static void * kldrHeapAllocSub (PKHLPHEAPANCHOR pHeap, KSIZE cb)

Variables

static KHLPHEAPANCHOR g_Heap


Generated by  Doxygen 1.6.0   Back to index