Initial Commit
[libctiny.git] / alloc.cc
bloba90271f842e9a9edc196bfa9cdefd945bc10bada
1 //==========================================
2 // LIBCTINY - Matt Pietrek 2001
3 // MSDN Magazine, January 2001
4 //==========================================
5 #include "libctiny.h"
6 #include <windows.h>
7 #include <malloc.h>
9 extern "C"
10 #if _MSC_VER >= 1400
11 __declspec(noalias restrict)
12 #endif
13 void * __cdecl malloc(size_t size) {
14 return HeapAlloc( GetProcessHeap(), 0, size );
17 extern "C"
18 #if _MSC_VER >= 1400
19 __declspec(noalias)
20 #endif
21 void __cdecl free(void * p) {
22 HeapFree( GetProcessHeap(), 0, p );