![]() |
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 17 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 35 of file omAllocPrivate.h.
| Data Fields | ||
|---|---|---|
| omBinPage | current_page | |
| omBinPage | last_page | |
| long | max_blocks | |
| omBin | next | |
| size_t | sizeW | |
| unsigned long | sticky | |
| struct omSpecBin_s |
Definition at line 46 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 313 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 330 of file omAllocPrivate.h.
| #define __omFree | ( | addr | ) |
Definition at line 297 of file omAllocPrivate.h.
| #define __omFreeBinAddr | ( | addr | ) |
Definition at line 162 of file omAllocPrivate.h.
| #define __omFreeSize | ( | addr, | |
| size | |||
| ) |
Definition at line 283 of file omAllocPrivate.h.
| #define __omFreeToPage | ( | addr, | |
| page | |||
| ) |
Definition at line 123 of file omAllocPrivate.h.
| #define __omTypeAlloc | ( | type, | |
| addr, | |||
| size | |||
| ) |
Definition at line 212 of file omAllocPrivate.h.
| #define __omTypeAlloc0 | ( | type, | |
| addr, | |||
| size | |||
| ) |
Definition at line 228 of file omAllocPrivate.h.
| #define __omTypeAlloc0Aligned __omTypeAlloc0 |
Definition at line 280 of file omAllocPrivate.h.
| #define __omTypeAlloc0Bin | ( | type, | |
| addr, | |||
| bin | |||
| ) |
Definition at line 153 of file omAllocPrivate.h.
| #define __omTypeAllocAligned __omTypeAlloc |
Definition at line 279 of file omAllocPrivate.h.
| #define __omTypeAllocBin | ( | type, | |
| addr, | |||
| bin | |||
| ) |
Definition at line 142 of file omAllocPrivate.h.
| #define __omTypeAllocFromNonEmptyPage | ( | type, | |
| addr, | |||
| page | |||
| ) |
Definition at line 114 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 347 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 349 of file omAllocPrivate.h.
| #define __omTypeRealloc0Aligned __omTypeRealloc0 |
Definition at line 367 of file omAllocPrivate.h.
| #define __omTypeRealloc0AlignedSize __omTypeRealloc0Size |
Definition at line 369 of file omAllocPrivate.h.
| #define __omTypeRealloc0Bin | ( | old_addr, | |
| old_bin, | |||
| new_type, | |||
| new_addr, | |||
| new_bin | |||
| ) |
Definition at line 189 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 353 of file omAllocPrivate.h.
| #define __omTypeReallocAligned __omTypeRealloc |
Definition at line 366 of file omAllocPrivate.h.
| #define __omTypeReallocAlignedSize __omTypeReallocSize |
Definition at line 368 of file omAllocPrivate.h.
| #define __omTypeReallocBin | ( | old_addr, | |
| old_bin, | |||
| new_type, | |||
| new_addr, | |||
| new_bin | |||
| ) |
Definition at line 171 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 351 of file omAllocPrivate.h.
| #define _omSizeOfBinAddr | ( | addr | ) | ((omSizeWOfBinAddr(addr)) << LOG_SIZEOF_LONG) |
Definition at line 101 of file omAllocPrivate.h.
| #define omGetBinOfAddr | ( | addr | ) | omGetBinOfPage(omGetBinPageOfAddr(addr)) |
Definition at line 79 of file omAllocPrivate.h.
| #define omGetStickyOfPage | ( | page | ) | (((unsigned long) ((page)->bin_sticky)) & ((unsigned long)SIZEOF_VOIDP-1)) |
Definition at line 66 of file omAllocPrivate.h.
| #define omGetTopBinOfAddr | ( | addr | ) | omGetTopBinOfPage(((omBinPage) omGetPageOfAddr(addr))) |
Definition at line 77 of file omAllocPrivate.h.
| #define omGetTopBinOfPage | ( | page | ) | ((omBin) ( ((unsigned long) ((page)->bin_sticky)) & ~((unsigned long)SIZEOF_VOIDP - 1))) |
Definition at line 64 of file omAllocPrivate.h.
| #define omSetStickyOfPage | ( | page, | |
| sticky | |||
| ) |
Definition at line 70 of file omAllocPrivate.h.
| #define omSetTopBinAndStickyOfPage | ( | page, | |
| bin, | |||
| sticky | |||
| ) |
Definition at line 73 of file omAllocPrivate.h.
| #define omSetTopBinOfPage | ( | page, | |
| bin | |||
| ) | (page)->bin_sticky= (void*)((unsigned long)bin + omGetStickyOfPage(page)) |
Definition at line 68 of file omAllocPrivate.h.
| #define omSizeOfBinAddr | ( | addr | ) | _omSizeOfBinAddr(addr) |
Definition at line 96 of file omAllocPrivate.h.
| #define omSizeWOfBin | ( | bin_ptr | ) | ((bin_ptr)->sizeW) |
Definition at line 99 of file omAllocPrivate.h.
| #define omSizeWOfBinAddr | ( | addr | ) | ((omGetTopBinOfAddr(addr))->sizeW) |
Definition at line 102 of file omAllocPrivate.h.
| #define omSmallSize2Bin | ( | size | ) | om_Size2Bin[((size) -1)>>LOG_SIZEOF_OM_ALIGNMENT] |
Definition at line 210 of file omAllocPrivate.h.
| #define SIZEOF_OM_BIN_PAGE (SIZEOF_SYSTEM_PAGE - SIZEOF_OM_BIN_PAGE_HEADER) |
Definition at line 31 of file omAllocPrivate.h.
| #define SIZEOF_OM_BIN_PAGE_HEADER (5*SIZEOF_VOIDP + SIZEOF_LONG) |
Definition at line 30 of file omAllocPrivate.h.
| void* omAllocBinFromFullPage | ( | omBin | bin | ) |
Definition at line 117 of file om_Alloc.c.
| void* omDoRealloc | ( | void * | old_addr, |
| size_t | new_size, | ||
| int | flags | ||
| ) |
Definition at line 227 of file om_Alloc.c.
| void omFreeToPageFault | ( | omBinPage | page, |
| void * | addr | ||
| ) |
Definition at line 165 of file om_Alloc.c.
| omBin om_Size2Bin |
Definition at line 83 of file omAllocPrivate.h.
| omSpecBin om_SpecBin |
Definition at line 18 of file om_Alloc.c.
| omBin_t om_StaticBin[] |
| omBinPage_t om_ZeroPage[] |
Definition at line 17 of file om_Alloc.c.