SDL_stdinc - thread safe calls? Missing functions? |
phao
|
By the way, I'm on SDL2 here.
|
|||||||||||
|
SDL_stdinc - thread safe calls? Missing functions? |
Sik
|
2014-12-17 12:16 GMT-03:00, phao:
Looked into the code, and it normally tries to just use malloc and free (so same rules apply). The only time it doesn't is when the platform has them missing (which is already kind of a problem), in which case it uses dlmalloc with USE_LOCKS enabled (which enables thread-safety). Not sure if I missed some other case. But yeah I guess it's safe to assume the dynamic memory functions are supposed to be thread-safe. _______________________________________________ SDL mailing list http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org |
|||||||||||||
|
SDL_stdinc - thread safe calls? Missing functions? |
Sik
|
Ugh should have paid more attention before replying.
2015-01-04 3:18 GMT-03:00, Sik the hedgehog:
It is when dlmalloc is used, when it isn't then it depends on the version of the C library (but if you're worrying about that then chances are that you're using one that is thread-safe anyway). _______________________________________________ SDL mailing list http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org |
|||||||||||||
|
SDL_stdinc - thread safe calls? Missing functions? |
Alex Szpakowski
Guest
|
Just one addition - USE_LOCKS is only enabled by default in SDL’s dmalloc implementation as of last May, so anything that uses SDL_malloc or SDL_free in an official Windows build of SDL 2.0.3 or older isn’t thread-safe.
On Jan 4, 2015, at 2:18 AM, Sik the hedgehog wrote:
_______________________________________________ SDL mailing list http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org |
|||||||||||||
|
SDL_stdinc - thread safe calls? Missing functions? |
Sik
|
2015-01-04 3:21 GMT-03:00, Alex Szpakowski:
That's what I get for looking only in the source code for one version
_______________________________________________ SDL mailing list http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org |
|||||||||||||||
|
phao
|
Thanks. I'll look into building SDL myself then.
=) |
|||||||||||
|
SDL_stdinc - thread safe calls? Missing functions? |
Joseph Carter
|
On Sun, Jan 04, 2015 at 01:59:51PM +0000, phao wrote:
You might want to use current Mercurial trunk to do that. We're gettin' on toward 2.0.4 by now. Although SDL2 is already getting used in commercial games, the fact is that SDL2 up through 2.0.3 has had some rather significant bugs devs have been ironing out. The release of 2.0.4 has been pushed back quite awhile thus far as the major niggling bugs get squashed. If you're going to use your own build for development now, plan on 2.0.4 being out by the time you get there and the folks 'round here will do all that can be done to accommodate. That needs to include me. *sigh* I've sadly neglected a few tasks of late. Joseph _______________________________________________ SDL mailing list http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org |
|||||||||||||
|