Parolin 0.7.9 6796
Console (soon DLLs) to do a tar like job
Loading...
Searching...
No Matches
Alloc.c File Reference
#include "Precomp.h"
#include <stdlib.h>
#include "Alloc.h"

Macros

#define PRINT_FREE(name, cnt, ptr)
 
#define Print(s)
 
#define PrintLn()
 
#define PrintHex(v, align)
 
#define PrintAddr(p)
 
#define ADJUST_ALLOC_SIZE   0
 
#define MY_ALIGN_PTR_DOWN(p, align)
 
#define MY_ALIGN_PTR_UP_PLUS(p, align)
 
#define ALLOC_ALIGN_SIZE   ((size_t)1 << 7)
 
#define MY_ALIGN_PTR_DOWN_1(p)
 
#define REAL_BLOCK_PTR_VAR(p)
 

Typedefs

typedef ptrdiff_t UIntPtr
 

Functions

void * MyAlloc (size_t size)
 
void MyFree (void *address)
 
void * MyRealloc (void *address, size_t size)
 
void AlignOffsetAlloc_CreateVTable (CAlignOffsetAlloc *p)
 

Variables

const ISzAlloc g_Alloc = { SzAlloc, SzFree }
 
const ISzAlloc g_AlignedAlloc = { SzAlignedAlloc, SzAlignedFree }
 

Macro Definition Documentation

◆ ADJUST_ALLOC_SIZE

#define ADJUST_ALLOC_SIZE   0

◆ ALLOC_ALIGN_SIZE

#define ALLOC_ALIGN_SIZE   ((size_t)1 << 7)

◆ MY_ALIGN_PTR_DOWN

#define MY_ALIGN_PTR_DOWN ( p,
align )
Value:
((void *)((((UIntPtr)(p)) & ~((UIntPtr)(align) - 1))))
ptrdiff_t UIntPtr
Definition Alloc.c:342

◆ MY_ALIGN_PTR_DOWN_1

#define MY_ALIGN_PTR_DOWN_1 ( p)
Value:
MY_ALIGN_PTR_DOWN(p, sizeof(void *))
#define MY_ALIGN_PTR_DOWN(p, align)
Definition Alloc.c:368

◆ MY_ALIGN_PTR_UP_PLUS

#define MY_ALIGN_PTR_UP_PLUS ( p,
align )
Value:
MY_ALIGN_PTR_DOWN(((char *)(p) + (align) + ADJUST_ALLOC_SIZE), align)
#define ADJUST_ALLOC_SIZE
Definition Alloc.c:338

◆ Print

#define Print ( s)

◆ PRINT_FREE

#define PRINT_FREE ( name,
cnt,
ptr )

◆ PrintAddr

#define PrintAddr ( p)

◆ PrintHex

#define PrintHex ( v,
align )

◆ PrintLn

#define PrintLn ( )

◆ REAL_BLOCK_PTR_VAR

#define REAL_BLOCK_PTR_VAR ( p)
Value:
((void **)MY_ALIGN_PTR_DOWN_1(p))[-1]
#define MY_ALIGN_PTR_DOWN_1(p)
Definition Alloc.c:499

Typedef Documentation

◆ UIntPtr

typedef ptrdiff_t UIntPtr

Function Documentation

◆ AlignOffsetAlloc_CreateVTable()

void AlignOffsetAlloc_CreateVTable ( CAlignOffsetAlloc * p)

◆ MyAlloc()

void * MyAlloc ( size_t size)

◆ MyFree()

void MyFree ( void * address)

◆ MyRealloc()

void * MyRealloc ( void * address,
size_t size )

Variable Documentation

◆ g_AlignedAlloc

const ISzAlloc g_AlignedAlloc = { SzAlignedAlloc, SzAlignedFree }

◆ g_Alloc

const ISzAlloc g_Alloc = { SzAlloc, SzFree }