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 uintptr_t MY_uintptr_t
 

Functions

void * MyAlloc (size_t size)
 
void MyFree (void *address)
 
void * MyRealloc (void *address, size_t size)
 
void * z7_AlignedAlloc (size_t size)
 
void z7_AlignedFree (void *address)
 
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 *)((((MY_uintptr_t)(p)) & ~((MY_uintptr_t)(align) - 1))))
uintptr_t MY_uintptr_t
Definition Alloc.c:359

◆ 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

◆ MY_uintptr_t

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 )

◆ z7_AlignedAlloc()

void * z7_AlignedAlloc ( size_t size)

◆ z7_AlignedFree()

void z7_AlignedFree ( void * address)

Variable Documentation

◆ g_AlignedAlloc

const ISzAlloc g_AlignedAlloc = { SzAlignedAlloc, SzAlignedFree }

◆ g_Alloc

const ISzAlloc g_Alloc = { SzAlloc, SzFree }