2 * Copyright 2013 Mislav Blažević
3 * Copyright 2015,2016 Mark Jansen
5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Lesser General Public
7 * License as published by the Free Software Foundation; either
8 * version 2.1 of the License, or (at your option) any later version.
10 * This library is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * Lesser General Public License for more details.
15 * You should have received a copy of the GNU Lesser General Public
16 * License along with this library; if not, write to the Free Software
17 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
27 void SdbpHeapInit(void);
28 void SdbpHeapDeinit(void);
30 #if SDBAPI_DEBUG_ALLOC
32 LPVOID
SdbpAlloc(SIZE_T size
, int line
, const char* file
);
33 LPVOID
SdbpReAlloc(LPVOID mem
, SIZE_T size
, int line
, const char* file
);
34 void SdbpFree(LPVOID mem
, int line
, const char* file
);
36 #define SdbAlloc(size) SdbpAlloc(size, __LINE__, __FILE__)
37 #define SdbReAlloc(mem, size) SdbpReAlloc(mem, size, __LINE__, __FILE__)
38 #define SdbFree(mem) SdbpFree(mem, __LINE__, __FILE__)
42 LPVOID
SdbpAlloc(SIZE_T size
);
43 LPVOID
SdbpReAlloc(LPVOID mem
, SIZE_T size
);
44 void SdbpFree(LPVOID mem
);
46 #define SdbAlloc(size) SdbpAlloc(size)
47 #define SdbReAlloc(mem, size) SdbpReAlloc(mem, size)
48 #define SdbFree(mem) SdbpFree(mem)
52 #if !defined(SDBWRITE_HOSTTOOL)
53 typedef struct tagMEMMAPPED
{
59 } MEMMAPPED
, *PMEMMAPPED
;
61 BOOL WINAPI
SdbpOpenMemMappedFile(LPCWSTR path
, PMEMMAPPED mapping
);
62 void WINAPI
SdbpCloseMemMappedFile(PMEMMAPPED mapping
);
66 PDB WINAPI
SdbpCreate(LPCWSTR path
, PATH_TYPE type
, BOOL write
);
67 void WINAPI
SdbpFlush(PDB db
);
68 DWORD
SdbpStrlen(LPCWSTR string
);