Navigation Menu

Skip to content

Commit

Permalink
Temporary fix for bug 2494 - Crashes due to the non thread-safe SDL_m…
Browse files Browse the repository at this point in the history
…alloc/SDL_free on Windows

We'll define USE_LOCKS as a temporary fix until an alternative like ptmalloc, jemalloc, or nedmalloc can be investigated.
http://www.malloc.de/en/
http://www.canonware.com/jemalloc/
http://www.nedprod.com/programs/portable/nedmalloc/

SDL allocates memory very infrequently, so this is probably a decent fix for a while.
  • Loading branch information
slouken committed May 10, 2014
1 parent 164e5b8 commit 1a4c0da
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/stdlib/SDL_malloc.c
Expand Up @@ -54,6 +54,7 @@ void SDL_free(void *ptr)
#define LACKS_STRING_H
#define LACKS_STDLIB_H
#define ABORT
#define USE_LOCKS 1

/*
This is a version (aka dlmalloc) of malloc/free/realloc written by
Expand Down

0 comments on commit 1a4c0da

Please sign in to comment.