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
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
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
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
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
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
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
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
Campbell Barton
b340f930ec
style cleanup: changes to brace placement / newlines - for/while/if/switch
2012-04-28 06:31:57 +00:00
Campbell Barton
df29e91a69
code cleanup: header cleanup, remove commented workaround for mingw since its no longer needed.
2012-04-06 04:46:47 +00:00
Campbell Barton
4f19c1a995
spelling cleanup
2012-03-18 07:38:51 +00:00
Campbell Barton
4a04f72069
remove $Id: tags after discussion on the mailign list: http://markmail.org/message/fp7ozcywxum3ar7n
2011-10-23 17:52:20 +00:00
Sergey Sharybin
3be50219fd
Abort on guarded memory manager errors if WITH_ASSERT_ABORT is set
2011-09-26 14:21:40 +00:00
Campbell Barton
4b449aefea
remove support for irix
2011-09-21 08:40:30 +00:00
Campbell Barton
83a2f02a78
cleanup endian handling
...
- define __BIG_ENDIAN__ or __LITTLE_ENDIAN__ with cmake & scons.
- ENDIAN_ORDER is now a define rather than a global short.
- replace checks like this with single ifdef: #if defined(__sgi) || defined (__sparc) || defined (__sparc__) || defined (__PPC__) || defined (__ppc__) || defined (__hppa__) || defined (__BIG_ENDIAN__)
- remove BKE_endian.h which isn't used
2011-09-19 08:02:17 +00:00
Campbell Barton
fa2ba5fbf5
- use static vars and functions where possible.
...
- use NULL rather than 0 when used as pointers.
2011-08-28 05:06:30 +00:00
Campbell Barton
f9f771cd01
converted more mixed tab/space indentations to tabs. only whitespace changes.
2011-04-21 15:53:30 +00:00
Campbell Barton
210ee1ade4
whitespace only, no functional change mixed tabs/spaces --> tabs.
2011-04-21 13:11:51 +00:00
Campbell Barton
709c727c51
replace 0 with NULL when used as a pointer
2011-03-03 17:58:06 +00:00
Nathan Letwory
56a4b21695
doxygen: intern/guardedalloc tagged
2011-02-25 11:41:12 +00:00
Campbell Barton
55f68c3657
fix for more warnings.
...
- modifier code was using sizeof() without knowing the sizeof the array when clearing the modifier type array.
- use BLI_snprintf rather then sprintf where the size of the string is known.
- particle drawing code kept a reference to stack float values (not a problem at the moment but would crash if accessed later).
2011-02-12 16:54:24 +00:00
Campbell Barton
89c617a116
remove nan-makefiles
2011-01-30 15:29:22 +00:00
Campbell Barton
d2076e38f1
correct own bad spelling
2011-01-23 12:42:07 +00:00
Campbell Barton
cd97253502
- added GCC warning -Wstrict-prototypes
...
- fixed bug in paste material, exposed by stricter warnings.
- removed/renamed various shadowed vars.
- removed BGE lamp.colour, only allow lamp.color attribute.
2010-12-03 12:30:59 +00:00
Campbell Barton
b45c3363fd
fix for some pedantic warnings.
2010-12-03 01:52:28 +00:00
Campbell Barton
77e3d5dfb4
define UNUSED() locally for mmap_win
2010-11-24 20:56:25 +00:00
Campbell Barton
c5f7207948
fix for crash introduced r33257, also tag some vars as unused.
2010-11-24 20:13:37 +00:00
Campbell Barton
433f871f0f
bugfix [ #24302 ] Ctrl+Click Extrude gets old mouse events
...
double click didnt check mouse distance moved so you could click twice in different areas of the screen very fast and generate a double click event which had old mouse coords copied into it but was sent to an operator set to run on single click (because the double click wasnt handled).
Also added MEM_name_ptr function (included in debug mode only), prints the name of allocated memory.
used for debugging where events came from.
2010-10-18 00:25:32 +00:00
Joseph Eagar
a7cbd5008e
merging revisions 28564-28569 from render branch into trunk
2010-05-04 12:31:24 +00:00
Campbell Barton
5e74542bb6
use size_t for MEM_allocN_len as well as some of its callers
2010-04-29 21:46:25 +00:00
Guillermo S. Romero
1fc7ea774f
Make Blender malloc wrapper be 64 bit ready.
2010-04-29 17:34:40 +00:00
Campbell Barton
c757c66f92
reverting 28469, there is no use in using a long, while the allocation functions only accepts an int.
...
- only wastes 4 bytes per alloc.
Also would be most correct to use size_t
2010-04-28 08:15:26 +00:00
Guillermo S. Romero
d6b71243c2
Make len portable (as best as can tested with a 32 bit machine).
2010-04-27 18:21:49 +00:00