comparison src/stdlib/SDL_malloc.c @ 4063:d634945c6172 SDL-1.2

Reverted r3255:3256. Don't actually need it unless the build is broken. :)
author Ryan C. Gordon <icculus@icculus.org>
date Sat, 14 Jul 2007 07:06:46 +0000
parents 95ecf165f113
children a9df0628d256
comparison
equal deleted inserted replaced
4062:ee5a38285651 4063:d634945c6172
608 #ifndef MALLINFO_FIELD_TYPE 608 #ifndef MALLINFO_FIELD_TYPE
609 #define MALLINFO_FIELD_TYPE size_t 609 #define MALLINFO_FIELD_TYPE size_t
610 #endif /* MALLINFO_FIELD_TYPE */ 610 #endif /* MALLINFO_FIELD_TYPE */
611 611
612 #define memset SDL_memset 612 #define memset SDL_memset
613 #define memcpy SDL_memcpy
613 #define malloc SDL_malloc 614 #define malloc SDL_malloc
614 #define calloc SDL_calloc 615 #define calloc SDL_calloc
615 #define realloc SDL_realloc 616 #define realloc SDL_realloc
616 #define free SDL_free 617 #define free SDL_free
617 618
3836 } 3837 }
3837 else { 3838 else {
3838 void* newmem = internal_malloc(m, bytes); 3839 void* newmem = internal_malloc(m, bytes);
3839 if (newmem != 0) { 3840 if (newmem != 0) {
3840 size_t oc = oldsize - overhead_for(oldp); 3841 size_t oc = oldsize - overhead_for(oldp);
3841 SDL_memcpy(newmem, oldmem, (oc < bytes)? oc : bytes); 3842 memcpy(newmem, oldmem, (oc < bytes)? oc : bytes);
3842 internal_free(m, oldmem); 3843 internal_free(m, oldmem);
3843 } 3844 }
3844 return newmem; 3845 return newmem;
3845 } 3846 }
3846 } 3847 }