Campbell Barton
2a8d76d734
add versions of MEM_reallocN, MEM_recallocN which take a string arg so new allocs have an ID, changing existing functions signatures would be too disruptive at the moment.
2013-08-03 17:53:41 +00:00
Campbell Barton
a6b505ef0b
style cleanup
2013-06-06 06:02:46 +00:00
Campbell Barton
7068a5eba7
tweak to recent commit, don't show keymap in menu tooltips.
2013-06-02 15:58:43 +00:00
Brecht Van Lommel
fe02323632
Fix to actually disable DEBUG_BACKTRACE by default.
2013-05-31 12:36:35 +00:00
Sergey Sharybin
1be2936298
Backtrace for unfreed memory blocks
...
Added an option to show backtrace from where
non-freed datablock was allocated from.
To enable this feature, simply enable DEBUG_BACKTRACE
in mallocn.c file and all unfreed datablocks will
be followed up by a backtrace.
Currently works on linux and osx only,
windows support is on TODO.
This feature is for sure disabled by default,
so does not affect any builds which don't
explicitly define DEBUG_BACKTRACE.
2013-05-30 14:27:24 +00:00
Campbell Barton
225c5fee6b
move BLO_sys_types.h -> BLI_sys_types.h (it had nothing todo with loading)
...
remove MEM_sys_types.h which was a duplicate.
2013-05-28 19:35:26 +00:00
Brecht Van Lommel
bc0e3ffc0c
Fix build error after removing return value from MEM_freeN.
2013-05-21 10:13:42 +00:00
Campbell Barton
cd6b27f2b5
remove return value from MEM_freeN, it wasn't used anywhere and was cast to a different function signature. (which evidently works but error prone).
2013-05-21 07:37:59 +00:00
Campbell Barton
7b707fff56
correct assert for driver evaluation,
...
also add asserts for listbase functions when the list is NULL, and use noreturn attribute for jpeg_error.
2013-05-12 05:54:33 +00:00
Campbell Barton
7d4eee2b18
add option to disable guardedalloc, helps for debugging memory errors
...
since guardedalloc confuses them.
The option cases a warning on build, since its ownly for experimental
use.
2013-05-08 12:55:23 +00:00
Campbell Barton
10b4a86dbf
code cleanup: quiet warnings building with mingw.
2013-03-29 00:50:52 +00:00
Campbell Barton
655ed9cc7f
style cleanup
2013-03-18 11:44:56 +00:00
Thomas Dinges
431619e45b
Windows compile fix:
...
* r54117 broke Windows, __func__ not declared.
2013-01-27 15:12:52 +00:00
Campbell Barton
9d36fade8f
make MEM_reallocN and MEM_recallocN behave as libc's realloc() - alloc when receiving a NULL value.
2013-01-27 11:20:50 +00:00
Sergey Sharybin
5e739ddae2
Added some code which helps troubleshooting issues caused by
...
non-threadsafe usage of guarded allocator.
Also added small chunk of code to check consistency of begin/end
threaded malloc.
All this additional checks are commented and wouldn't affect on
builds, however found them helpful to troubleshoot issues so
decided to commit it to SVN.
2013-01-24 08:14:05 +00:00
Sergey Sharybin
6571713ddb
Ambient occlusion baker from multi-resolution mesh
...
This implements AO baking directly from multi-resolution mesh with much
less memory overhead than regular baker.
Uses rays distribution implementation from Morten Mikkelsen, raycast
is based on RayObject also used by Blender Internal.
Works in single-thread yet, multi-threading would be implemented later.
2012-12-18 17:46:42 +00:00
Bastien Montagne
ab2c273b12
Added GPL header to sconscripts!
...
Also changed shebang to '#!/usr/bin/env python', this is more portable across unixes...
2012-12-17 08:01:43 +00:00
Campbell Barton
60808c5ed6
disable openmp thread assert, would fail in cases where the caller was locking for its self (sculpt mode)
2012-12-13 10:37:04 +00:00
Campbell Barton
21a2660290
assert in debug builds if MEM_ alloc's are called in openmp threads.
...
note: the caller can do locking to prevent errors - but this isn't being done in blender yet, so this prevents accidental allocs in openmp for now.
2012-12-12 04:41:23 +00:00
Sergey Sharybin
a8905364c3
Typo fix in comment. No functional changes.
2012-11-28 09:49:26 +00:00
Campbell Barton
936f0388e8
code cleanup: some warnings and formatting for PyMethodDef's in the BGE.
2012-11-10 05:42:50 +00:00
Campbell Barton
fbe13ab84a
style cleanup
2012-09-20 12:29:28 +00:00
Campbell Barton
aaafa0c2fe
code cleanup: move file string defines into BLI_path_utils.h, BKE_utildefines is now unused but keep incase we want to add defines there later.
2012-09-03 22:04:14 +00:00
Campbell Barton
9a776daca8
code cleanup: vfont's used confusing and over complicated method of storing memory for loaded fonts, not store as a temp var in the fonts.
2012-08-21 10:39:02 +00:00
Campbell Barton
b96c622015
style cleanup
2012-08-11 22:12:32 +00:00
Campbell Barton
51182bc78d
add MEM_recallocN(), so bytes are ensured to be zero'd when growing.
2012-08-11 12:16:09 +00:00
Campbell Barton
7fd1bd18e5
fix crash when polling image sample outside image space.
...
also remove historic comment which isnt helpful.
2012-08-01 14:29:24 +00:00
Brecht Van Lommel
aac3f0eaeb
Fix warnings on old apple GCC compiler due to no support for alloc_size attribute.
2012-07-31 15:05:09 +00:00
Sergey Sharybin
3337887fd1
Debug option for guarded allocation: store name of original datablock
...
when using MEM_dupallocN. This helps figuring out issues with non-freed
dup_alloc blocks,
Simply enable DEBUG_MEMDUPLINAME in mallocn.c file.
2012-07-24 15:17:03 +00:00
Campbell Barton
e4cfcdc3a6
header comment cleanup, explain whats the difference between confusingly named drarnode.c and node_draw.c.
2012-07-14 15:29:45 +00:00
Campbell Barton
98520ce4de
use gcc attributes for BLI alloc functions
2012-07-14 12:47:49 +00:00
Bastien Montagne
4c6abb8105
Fix for error from grumpy gcc in "over-warning" mode. Must explicitely cast uintptr_t to unsigned int (othe solution would be to use PRIuPTR macro from inttypes.h, but that would probably causes some problems with windows...).
2012-07-08 15:48:47 +00:00
Campbell Barton
76629c11ae
correct use of __attribute__((nonnull))
2012-07-08 15:11:13 +00:00
Campbell Barton
b91bc4f037
use gcc attrubutes to warn on unused return values and arguments which shouldnt be NULL.
...
also remove IDP_AppendArray's return value which wasnt the new item in the array (which is odd/misleading), but wasnt used anywhere either.
2012-07-08 06:00:27 +00:00
Campbell Barton
1d29ee0d3b
use alloc_size attribute for guarded alloc functions with gcc.
2012-07-08 03:15:37 +00:00
Campbell Barton
c8c743b609
code cleanup: compile with clang and quiet some warnings.
2012-06-28 12:32:06 +00:00
Campbell Barton
a89d551a1c
committed debug memcount by accident
2012-06-27 22:27:04 +00:00
Campbell Barton
a09feb7386
option so operators can be executed with undo enabled (and redo).
2012-06-27 21:41:17 +00:00
Campbell Barton
d008807a2d
style cleanup: header comments, use more doxy compat formatting
2012-06-27 17:48:39 +00:00
Brecht Van Lommel
ae797383b7
Guardedalloc/C++: delete is valid on a NULL pointer, add a check so MEM_freeN
...
doesn't print warning messages.
2012-06-25 11:43:12 +00:00
Campbell Barton
3c8a4c458b
more guardedalloc use in C++, also make compositorMutex a static var, was allocated and never freed.
2012-06-25 10:35:24 +00:00
Campbell Barton
cc0784c1b9
optionally use guarded alloc for tiles compositor, also replace allocation functions with a macro.
2012-06-25 09:14:37 +00:00
Campbell Barton
26ca0008ee
typo/style edits
2012-06-08 05:53:30 +00:00
Campbell Barton
a6f3e15d6e
- remove redundant NULL checks from mallocn's local linked list functions.
...
- minor changes to warning cleanup.
2012-06-08 05:46:00 +00:00
Campbell Barton
857dedbc58
style cleanup
2012-05-27 00:36:50 +00:00
Campbell Barton
76599a4989
update python script memory printout to python3 and some style cleanup
2012-05-26 13:59:34 +00:00
Campbell Barton
88e646b0d4
style cleanup: our own malloc code
2012-05-26 13:36:12 +00:00
Campbell Barton
ed98de3398
code cleanup: dutch -> english (comments)
2012-05-26 13:31:57 +00:00
Campbell Barton
eb023322ef
style cleanup: mmap_win32
2012-05-22 13:20:01 +00:00
Brecht Van Lommel
0c318c4a47
Fix (harmless) uninitialized memory usage in BVH binning.
...
Fix unneeded warnings with c++ guardedalloc, delete NULL is valid.
2012-05-04 16:38:11 +00:00