Guardedalloc: Add extra logging and checks in MEM_freeN()
authorSergey Sharybin <sergey.vfx@gmail.com>
Wed, 18 Feb 2015 20:58:49 +0000 (01:58 +0500)
committerSergey Sharybin <sergey.vfx@gmail.com>
Wed, 18 Feb 2015 20:58:49 +0000 (01:58 +0500)
commit6c5f63b476ccd2ede41b94360641541f0aa9af38
treea959e7f5897441d90e9e2fcf0cef4fe079d48e28
parent0f2adc081716da9f6f09608e762056f3143f91d2
Guardedalloc: Add extra logging and checks in MEM_freeN()

We don't like when NULL is send to MEM_freeN(), but there was some
differences between lockfree and guarded allocators:

- Lockfree would have silently crash, in both release and debug modes
- Guarded allocator would have printed error message, abort in debug
  but keep working in release build.

This commit makes lockfree allocator behavior to match guarded one.
intern/guardedalloc/intern/mallocn.c
intern/guardedalloc/intern/mallocn_guarded_impl.c
intern/guardedalloc/intern/mallocn_lockfree_impl.c