-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathJsonLibConfig.h
30 lines (26 loc) · 1 KB
/
JsonLibConfig.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// JsonLibConfig.h
//
// This file will be include in JsonLib.h and is used to redirect the allocation functions to the WjTestLib alloc
// functions for memory tracking.
// This file is included by by having JL_INCLUDE_H set to this file (This is done in cmake file)
//
// This is free and unencumbered software released into the public domain - November 2019 waterjuice.org
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
#pragma once
void*
WjTestLib_Calloc
(
size_t NumOfElements,
size_t SizeOfElements
);
void
WjTestLib_Free
(
void* Memory
);
#ifndef NDEBUG
// Don't include the memory tracking in release mode
#define JlAlloc( AllocSize ) WjTestLib_Calloc ( (AllocSize), 1 )
#define JlFree( Allocation ) WjTestLib_Free( Allocation )
#endif