ReactOS Fundraising Campaign 2012
 
€ 4,410 / € 30,000

Information | Donate

Home | Info | Community | Development | myReactOS | Contact Us

  1. Home
  2. Community
  3. Development
  4. myReactOS
  5. Fundraiser 2012

  1. Main Page
  2. Alphabetical List
  3. Data Structures
  4. Directories
  5. File List
  6. Data Fields
  7. Globals
  8. Related Pages

ReactOS Development > Doxygen

debug_ros.c
Go to the documentation of this file.
00001 /* The use of these four functions was creating unwanted imports
00002  * from msvcrt.dll in kernel32.dll. */
00003 
00004 #define malloc libwine_malloc
00005 #define free libwine_free
00006 #define realloc libwine_realloc
00007 #define _strdup libwine__strdup
00008 #define interlocked_xchg_add InterlockedExchangeAdd
00009 
00010 #include "debug.c"
00011 
00012 __MINGW_ATTRIB_MALLOC
00013 void *malloc(size_t size)
00014 {
00015     return LocalAlloc(0, size);
00016 }
00017 
00018 void free(void *ptr)
00019 {
00020     LocalFree(ptr);
00021 }
00022 
00023 void *realloc(void *ptr, size_t size)
00024 {
00025     if (ptr == NULL) return malloc(size);
00026     return LocalReAlloc(ptr, size, LMEM_MOVEABLE);
00027 }
00028 
00029 __MINGW_ATTRIB_MALLOC
00030 char *_strdup(const char *str)
00031 {
00032     char *newstr = malloc(strlen(str) + 1);
00033     if (newstr) strcpy(newstr, str);
00034     return newstr;
00035 }

Generated on Sat May 26 2012 04:33:05 for ReactOS by doxygen 1.7.6.1

ReactOS is a registered trademark or a trademark of ReactOS Foundation in the United States and other countries.