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_macosx.cpp | 44 +---------------------------------- 1 file changed, 1 insertion(+), 43 deletions(-) (limited to 'src/osd/modules/lib/osdlib_macosx.cpp') diff --git a/src/osd/modules/lib/osdlib_macosx.cpp b/src/osd/modules/lib/osdlib_macosx.cpp index 94b935de08d..0d353531b0d 100644 --- a/src/osd/modules/lib/osdlib_macosx.cpp +++ b/src/osd/modules/lib/osdlib_macosx.cpp @@ -57,48 +57,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 // @@ -205,7 +163,7 @@ char *osd_get_clipboard_text(void) CFIndex const length = CFDataGetLength(data_ref); CFRange const range = CFRangeMake(0, length); - result = reinterpret_cast(osd_malloc_array(length + 1)); + result = reinterpret_cast(malloc(length + 1)); if (result) { CFDataGetBytes(data_ref, range, reinterpret_cast(result)); -- cgit v1.2.3-70-g09d2