Loading...
Searching...
No Matches
omAllocSystem.h
Go to the documentation of this file.
/*******************************************************************
* File: omAllocSystem.h
* Purpose: declaration of routines for low-level alloc routines
* and page management
* Author: obachman (Olaf Bachmann)
* Created: 11/99
*******************************************************************/
#ifndef OM_ALLOC_SYSTEM_H
#define OM_ALLOC_SYSTEM_H
#ifndef _OMALLOC_OMCONFIG_H
#include "omalloc/omConfig.h"
#endif
size_t omSizeOfAddr(const void* addr);
size_t omSizeWOfAddr(void* addr);
size_t omSizeOfLargeAddr(void* addr);
#define omSizeWOfLargeAddr(addr) (omSizeOfLargeAddr(addr) >> LOG_SIZEOF_LONG)
void* omAllocFromSystem(size_t size);
void* omReallocFromSystem(void* addr, size_t newsize);
void omFreeToSystem(void* addr);
void* omReallocSizeFromSystem(void* addr, size_t oldsize, size_t newsize);
void omFreeSizeToSystem(void* addr, size_t size);
#define omVallocFromSystem(size) _omVallocFromSystem(size, 0)
void* _omVallocFromSystem(size_t size, int fail);
void omVfreeToSystem(void* page, size_t size);
#if defined(HAVE_MALLOC_SIZE) || defined(HAVE_MALLOC_USABLE_SIZE)
#define omAllocLarge(size) omAllocFromSystem(size)
#define omReallocLarge(addr, new_size) omReallocSizeFromSystem(addr, omSizeOfLargeAddr(addr), new_size)
#define omFreeLarge(addr) omFreeSizeToSystem(addr, omSizeOfLargeAddr(addr))
#else
void* omAllocLarge(size_t size);
void* omReallocLarge(void* old_addr, size_t new_size);
void omFreeLarge(void* addr);
#endif
void* omRealloc0Large(void* old_addr, size_t new_size);
void* omAlloc0Large(size_t size);
#endif /* OM_ALLOC_SYSTEM_H */
size
int size(const CanonicalForm &f, const Variable &v)
int size ( const CanonicalForm & f, const Variable & v )
Definition cf_ops.cc:600
_omVallocFromSystem
void * _omVallocFromSystem(size_t size, int fail)
Definition omAllocSystem.c:318
omAllocFromSystem
void * omAllocFromSystem(size_t size)
Definition omAllocSystem.c:194
omReallocFromSystem
void * omReallocFromSystem(void *addr, size_t newsize)
Definition omAllocSystem.c:245
omVfreeToSystem
void omVfreeToSystem(void *page, size_t size)
Definition omAllocSystem.c:368
omSizeOfLargeAddr
size_t omSizeOfLargeAddr(void *addr)
Definition omAllocSystem.c:105
omFreeLarge
void omFreeLarge(void *addr)
Definition omAllocSystem.c:73
omRealloc0Large
void * omRealloc0Large(void *old_addr, size_t new_size)
Definition omAllocSystem.c:89
omFreeSizeToSystem
void omFreeSizeToSystem(void *addr, size_t size)
Definition omAllocSystem.c:311
omReallocLarge
void * omReallocLarge(void *old_addr, size_t new_size)
Definition omAllocSystem.c:57
omSizeOfAddr
size_t omSizeOfAddr(const void *addr)
Definition omAllocSystem.c:110
omFreeToSystem
void omFreeToSystem(void *addr)
Definition omAllocSystem.c:306
omAllocLarge
void * omAllocLarge(size_t size)
Definition omAllocSystem.c:48
omReallocSizeFromSystem
void * omReallocSizeFromSystem(void *addr, size_t oldsize, size_t newsize)
Definition omAllocSystem.c:250
omAlloc0Large
void * omAlloc0Large(size_t size)
Definition omAllocSystem.c:82
omSizeWOfAddr
#define omSizeWOfAddr(P)
Definition xalloc.h:223