From 7c765ea14785a4ad6efd2e30e03447f354bed6b4 Mon Sep 17 00:00:00 2001 From: Miodrag Milanovic Date: Fri, 11 Nov 2016 14:34:46 +0100 Subject: No need for osd_malloc, osd_malloc_array and osd_free (nw) MALLOC_DEBUG not applicable anymore since we use new to allocate in 99.9% of cases --- src/osd/modules/lib/osdlib_unix.cpp | 43 +------------------------------------ 1 file changed, 1 insertion(+), 42 deletions(-) (limited to 'src/osd/modules/lib/osdlib_unix.cpp') diff --git a/src/osd/modules/lib/osdlib_unix.cpp b/src/osd/modules/lib/osdlib_unix.cpp index 054c4591f71..f6e892455f8 100644 --- a/src/osd/modules/lib/osdlib_unix.cpp +++ b/src/osd/modules/lib/osdlib_unix.cpp @@ -55,47 +55,6 @@ void osd_process_kill() kill(getpid(), SIGKILL); } -//============================================================ -// osd_malloc -//============================================================ - -void *osd_malloc(size_t size) -{ -#ifndef MALLOC_DEBUG - return malloc(size); -#else -#error "MALLOC_DEBUG not yet supported" -#endif -} - - -//============================================================ -// osd_malloc_array -//============================================================ - -void *osd_malloc_array(size_t size) -{ -#ifndef MALLOC_DEBUG - return malloc(size); -#else -#error "MALLOC_DEBUG not yet supported" -#endif -} - - -//============================================================ -// osd_free -//============================================================ - -void osd_free(void *ptr) -{ -#ifndef MALLOC_DEBUG - free(ptr); -#else -#error "MALLOC_DEBUG not yet supported" -#endif -} - //============================================================ // osd_alloc_executable // @@ -160,7 +119,7 @@ char *osd_get_clipboard_text(void) if (SDL_HasClipboardText()) { char *temp = SDL_GetClipboardText(); - result = (char *) osd_malloc_array(strlen(temp) + 1); + result = (char *) malloc(strlen(temp) + 1); strcpy(result, temp); SDL_free(temp); } -- cgit v1.2.3