My Project
|
#include "omalloc/omAllocSystem.h"
Go to the source code of this file.
Data Structures | |
struct | omBinPage_t |
struct | omBin_t |
struct | omSpecBin_t |
Macros | |
#define | SIZEOF_OM_BIN_PAGE_HEADER (5*SIZEOF_VOIDP + SIZEOF_LONG) |
#define | SIZEOF_OM_BIN_PAGE (SIZEOF_SYSTEM_PAGE - SIZEOF_OM_BIN_PAGE_HEADER) |
#define | omGetTopBinOfPage(page) ((omBin) ( ((unsigned long) ((page)->bin_sticky)) & ~((unsigned long)SIZEOF_VOIDP - 1))) |
#define | omGetStickyOfPage(page) (((unsigned long) ((page)->bin_sticky)) & ((unsigned long)SIZEOF_VOIDP-1)) |
#define | omSetTopBinOfPage(page, bin) (page)->bin_sticky= (void*)((unsigned long)bin + omGetStickyOfPage(page)) |
#define | omSetStickyOfPage(page, sticky) |
#define | omSetTopBinAndStickyOfPage(page, bin, sticky) |
#define | omGetTopBinOfAddr(addr) omGetTopBinOfPage(((omBinPage) omGetPageOfAddr(addr))) |
#define | omGetBinOfAddr(addr) omGetBinOfPage(omGetBinPageOfAddr(addr)) |
#define | omSizeOfBinAddr(addr) _omSizeOfBinAddr(addr) |
#define | omSizeWOfBin(bin_ptr) ((bin_ptr)->sizeW) |
#define | _omSizeOfBinAddr(addr) ((omSizeWOfBinAddr(addr)) << LOG_SIZEOF_LONG) |
#define | omSizeWOfBinAddr(addr) ((omGetTopBinOfAddr(addr))->sizeW) |
#define | __omTypeAllocFromNonEmptyPage(type, addr, page) |
#define | __omFreeToPage(addr, page) |
#define | __omTypeAllocBin(type, addr, bin) |
#define | __omTypeAlloc0Bin(type, addr, bin) |
#define | __omFreeBinAddr(addr) |
#define | __omTypeReallocBin(old_addr, old_bin, new_type, new_addr, new_bin) |
#define | __omTypeRealloc0Bin(old_addr, old_bin, new_type, new_addr, new_bin) |
#define | omSmallSize2Bin(size) om_Size2Bin[((size) -1)>>LOG_SIZEOF_OM_ALIGNMENT] |
#define | __omTypeAlloc(type, addr, size) |
#define | __omTypeAlloc0(type, addr, size) |
#define | __omTypeAllocAligned __omTypeAlloc |
#define | __omTypeAlloc0Aligned __omTypeAlloc0 |
#define | __omFreeSize(addr, size) |
#define | __omFree(addr) |
#define | ___omTypeRealloc(old_addr, new_type, new_addr, new_size, SIZE_2_BIN, REALLOC_BIN, flags) |
#define | ___omTypeReallocSize(old_addr, old_size, new_type, new_addr, new_size, SIZE_2_BIN, REALLOC_BIN, flags) |
#define | __omTypeRealloc(old_addr, new_type, new_addr, new_size) ___omTypeRealloc(old_addr, new_type, new_addr, new_size, omSmallSize2Bin, __omTypeReallocBin, 0) |
#define | __omTypeRealloc0(old_addr, new_type, new_addr, new_size) ___omTypeRealloc(old_addr, new_type, new_addr, new_size, omSmallSize2Bin, __omTypeRealloc0Bin, 1) |
#define | __omTypeReallocSize(old_addr, old_size, new_type, new_addr, new_size) ___omTypeReallocSize(old_addr, old_size, new_type, new_addr, new_size, omSmallSize2Bin, __omTypeReallocBin, 0) |
#define | __omTypeRealloc0Size(old_addr, old_size, new_type, new_addr, new_size) ___omTypeReallocSize(old_addr, old_size, new_type, new_addr, new_size, omSmallSize2Bin, __omTypeRealloc0Bin, 1) |
#define | __omTypeReallocAligned __omTypeRealloc |
#define | __omTypeRealloc0Aligned __omTypeRealloc0 |
#define | __omTypeReallocAlignedSize __omTypeReallocSize |
#define | __omTypeRealloc0AlignedSize __omTypeRealloc0Size |
Functions | |
void * | omAllocBinFromFullPage (omBin bin) |
void | omFreeToPageFault (omBinPage page, void *addr) |
void * | omDoRealloc (void *old_addr, size_t new_size, int flags) |
Variables | |
omSpecBin | om_SpecBin |
omBin | om_StickyBins |
omBinPage_t | om_ZeroPage [] |
omBin | om_Size2Bin [] |
omBin_t | om_StaticBin [] |
struct omBinPage_s |
Definition at line 18 of file omAllocPrivate.h.
Data Fields | ||
---|---|---|
void * | bin_sticky | |
void * | current | |
omBinPage | next | |
omBinPage | prev | |
omBinPageRegion | region | |
long | used_blocks |
struct omBin_s |
Definition at line 36 of file omAllocPrivate.h.
Data Fields | ||
---|---|---|
omBin_next | curr | |
omBinPage | current_page | |
omBinPage | last_page | |
long | max_blocks | |
omBin | next | |
size_t | size | |
size_t | sizeW | |
unsigned long | sticky |
struct omSpecBin_s |
Definition at line 47 of file omAllocPrivate.h.
Data Fields | ||
---|---|---|
omBin | bin | |
long | max_blocks | |
omSpecBin | next | |
long | ref |
#define ___omTypeRealloc | ( | old_addr, | |
new_type, | |||
new_addr, | |||
new_size, | |||
SIZE_2_BIN, | |||
REALLOC_BIN, | |||
flags | |||
) |
Definition at line 314 of file omAllocPrivate.h.
#define ___omTypeReallocSize | ( | old_addr, | |
old_size, | |||
new_type, | |||
new_addr, | |||
new_size, | |||
SIZE_2_BIN, | |||
REALLOC_BIN, | |||
flags | |||
) |
Definition at line 331 of file omAllocPrivate.h.
#define __omFree | ( | addr | ) |
Definition at line 298 of file omAllocPrivate.h.
#define __omFreeBinAddr | ( | addr | ) |
Definition at line 163 of file omAllocPrivate.h.
#define __omFreeSize | ( | addr, | |
size | |||
) |
Definition at line 284 of file omAllocPrivate.h.
#define __omFreeToPage | ( | addr, | |
page | |||
) |
Definition at line 124 of file omAllocPrivate.h.
#define __omTypeAlloc | ( | type, | |
addr, | |||
size | |||
) |
Definition at line 213 of file omAllocPrivate.h.
#define __omTypeAlloc0 | ( | type, | |
addr, | |||
size | |||
) |
Definition at line 229 of file omAllocPrivate.h.
#define __omTypeAlloc0Aligned __omTypeAlloc0 |
Definition at line 281 of file omAllocPrivate.h.
#define __omTypeAlloc0Bin | ( | type, | |
addr, | |||
bin | |||
) |
Definition at line 154 of file omAllocPrivate.h.
#define __omTypeAllocAligned __omTypeAlloc |
Definition at line 280 of file omAllocPrivate.h.
#define __omTypeAllocBin | ( | type, | |
addr, | |||
bin | |||
) |
Definition at line 143 of file omAllocPrivate.h.
#define __omTypeAllocFromNonEmptyPage | ( | type, | |
addr, | |||
page | |||
) |
Definition at line 115 of file omAllocPrivate.h.
#define __omTypeRealloc | ( | old_addr, | |
new_type, | |||
new_addr, | |||
new_size | |||
) | ___omTypeRealloc(old_addr, new_type, new_addr, new_size, omSmallSize2Bin, __omTypeReallocBin, 0) |
Definition at line 348 of file omAllocPrivate.h.
#define __omTypeRealloc0 | ( | old_addr, | |
new_type, | |||
new_addr, | |||
new_size | |||
) | ___omTypeRealloc(old_addr, new_type, new_addr, new_size, omSmallSize2Bin, __omTypeRealloc0Bin, 1) |
Definition at line 350 of file omAllocPrivate.h.
#define __omTypeRealloc0Aligned __omTypeRealloc0 |
Definition at line 368 of file omAllocPrivate.h.
#define __omTypeRealloc0AlignedSize __omTypeRealloc0Size |
Definition at line 370 of file omAllocPrivate.h.
#define __omTypeRealloc0Bin | ( | old_addr, | |
old_bin, | |||
new_type, | |||
new_addr, | |||
new_bin | |||
) |
Definition at line 190 of file omAllocPrivate.h.
#define __omTypeRealloc0Size | ( | old_addr, | |
old_size, | |||
new_type, | |||
new_addr, | |||
new_size | |||
) | ___omTypeReallocSize(old_addr, old_size, new_type, new_addr, new_size, omSmallSize2Bin, __omTypeRealloc0Bin, 1) |
Definition at line 354 of file omAllocPrivate.h.
#define __omTypeReallocAligned __omTypeRealloc |
Definition at line 367 of file omAllocPrivate.h.
#define __omTypeReallocAlignedSize __omTypeReallocSize |
Definition at line 369 of file omAllocPrivate.h.
#define __omTypeReallocBin | ( | old_addr, | |
old_bin, | |||
new_type, | |||
new_addr, | |||
new_bin | |||
) |
Definition at line 172 of file omAllocPrivate.h.
#define __omTypeReallocSize | ( | old_addr, | |
old_size, | |||
new_type, | |||
new_addr, | |||
new_size | |||
) | ___omTypeReallocSize(old_addr, old_size, new_type, new_addr, new_size, omSmallSize2Bin, __omTypeReallocBin, 0) |
Definition at line 352 of file omAllocPrivate.h.
#define _omSizeOfBinAddr | ( | addr | ) | ((omSizeWOfBinAddr(addr)) << LOG_SIZEOF_LONG) |
Definition at line 102 of file omAllocPrivate.h.
#define omGetBinOfAddr | ( | addr | ) | omGetBinOfPage(omGetBinPageOfAddr(addr)) |
Definition at line 80 of file omAllocPrivate.h.
#define omGetStickyOfPage | ( | page | ) | (((unsigned long) ((page)->bin_sticky)) & ((unsigned long)SIZEOF_VOIDP-1)) |
Definition at line 67 of file omAllocPrivate.h.
#define omGetTopBinOfAddr | ( | addr | ) | omGetTopBinOfPage(((omBinPage) omGetPageOfAddr(addr))) |
Definition at line 78 of file omAllocPrivate.h.
#define omGetTopBinOfPage | ( | page | ) | ((omBin) ( ((unsigned long) ((page)->bin_sticky)) & ~((unsigned long)SIZEOF_VOIDP - 1))) |
Definition at line 65 of file omAllocPrivate.h.
#define omSetStickyOfPage | ( | page, | |
sticky | |||
) |
Definition at line 71 of file omAllocPrivate.h.
#define omSetTopBinAndStickyOfPage | ( | page, | |
bin, | |||
sticky | |||
) |
Definition at line 74 of file omAllocPrivate.h.
#define omSetTopBinOfPage | ( | page, | |
bin | |||
) | (page)->bin_sticky= (void*)((unsigned long)bin + omGetStickyOfPage(page)) |
Definition at line 69 of file omAllocPrivate.h.
#define omSizeOfBinAddr | ( | addr | ) | _omSizeOfBinAddr(addr) |
Definition at line 97 of file omAllocPrivate.h.
#define omSizeWOfBin | ( | bin_ptr | ) | ((bin_ptr)->sizeW) |
Definition at line 100 of file omAllocPrivate.h.
#define omSizeWOfBinAddr | ( | addr | ) | ((omGetTopBinOfAddr(addr))->sizeW) |
Definition at line 103 of file omAllocPrivate.h.
#define omSmallSize2Bin | ( | size | ) | om_Size2Bin[((size) -1)>>LOG_SIZEOF_OM_ALIGNMENT] |
Definition at line 211 of file omAllocPrivate.h.
#define SIZEOF_OM_BIN_PAGE (SIZEOF_SYSTEM_PAGE - SIZEOF_OM_BIN_PAGE_HEADER) |
Definition at line 32 of file omAllocPrivate.h.
#define SIZEOF_OM_BIN_PAGE_HEADER (5*SIZEOF_VOIDP + SIZEOF_LONG) |
Definition at line 31 of file omAllocPrivate.h.
void * omAllocBinFromFullPage | ( | omBin | bin | ) |
Definition at line 119 of file om_Alloc.c.
void * omDoRealloc | ( | void * | old_addr, |
size_t | new_size, | ||
int | flags | ||
) |
Definition at line 229 of file om_Alloc.c.
void omFreeToPageFault | ( | omBinPage | page, |
void * | addr | ||
) |
Definition at line 167 of file om_Alloc.c.
|
extern |
Definition at line 84 of file omAllocPrivate.h.
|
extern |
Definition at line 20 of file om_Alloc.c.
|
extern |
|
extern |
Definition at line 19 of file om_Alloc.c.