vg_print_backtrace();
size = vg_align8( size );
}
-#ifdef _WIN32
- if( ((u32)buffer) % 8 ){
-#else
if( ((u64)buffer) % 8 ){
-#endif
vg_fatal_error( "unaligned buffer (%p)", buffer );
}
alloc->last_alloc_size = size;
alloc->cur += size;
-#ifdef _WIN32
- if( ((u32)data) % 8 ){
-#else
if( ((u64)data) % 8 ){
-#endif
vg_fatal_error( "unaligned" );
}
alloc->cur = 0;
}
-/* allocate a FIXED SIZE linear allocator */
+/* allocate a FIXED SIZE linear allocator
+ *
+ * FIXME: there was a bug in vg's code that caused a race condition between
+ * two system allocations. make this IMPOSSIBLE by requiring a lock
+ * on the allocater to be passed between threads.
+ *
+ * luckily that bug only exists when using development tools, but still!
+ *
+ * this should then only be checked and turned on in debugging.
+ *
+ */
static void *_vg_create_linear_allocator( void *lin_alloc, u32 size,
u16 flags, const char *constr_name)
{