OLD | NEW |
| (Empty) |
1 //========================================== | |
2 // LIBCTINY - Matt Pietrek 2001 | |
3 // MSDN Magazine, January 2001 | |
4 //========================================== | |
5 #include "libctiny.h" | |
6 #include <windows.h> | |
7 #include <malloc.h> | |
8 | |
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 ); | |
15 } | |
16 | |
17 extern "C" | |
18 #if _MSC_VER >= 1400 | |
19 __declspec(noalias) | |
20 #endif | |
21 void __cdecl free(void * p) { | |
22 HeapFree( GetProcessHeap(), 0, p ); | |
23 } | |
OLD | NEW |