Age | Commit message (Collapse) | Author |
|
Also make it to return truth when everything is good and
false otherwise.
|
|
Differential Revision: https://developer.blender.org/D3002
|
|
These platforms didn't see maintenance in years.
This commit just removes ifdef's & cmake check.
|
|
only instantiate the argument once,
so MEM_SAFE_FREE(array[i++]), won't cause incorrect behavior.
|
|
This basically fixes mix of size_t and uintptr_t usages which might be different size.
|
|
|
|
This gives around 30% of speedup for gaussian blur node.
Pretty much straightforward implementation inside the node
itself, but needed to implement some additional things:
- Aligned malloc. It's needed to load data onto SSE registers
faster. based on the aligned_malloc() from Libmv with
some additional trickery going on to support arbitrary
alignment (this magic is needed because of MemHead).
In the practice only 16bit alignment is supported because
of the lack of aligned malloc with arbitrary alignment
for OSX. Not a bit deal for now because we need 16 bytes
alignment at this moment only. Could be tweaked further
later.
- Memory buffers in compositor are now aligned to 16 bytes.
Should be harmless for non-SSE cases too. just mentioning.
Reviewers: campbellbarton, lukastoenne, jbakker
Reviewed By: campbellbarton
CC: lockal
Differential Revision: https://developer.blender.org/D564
|
|
|
|
Release builds will now use lock-free allocator by
default without any internal locks happening.
MemHead is also reduces to as minimum as it's possible.
It still need to be size_t stored in a MemHead in order
to make us keep track on memory we're requesting from
the system, not memory which system is allocating. This
is probably also faster than using a malloc's usable
size function.
Lock-free guarded allocator will say you whether all
the blocks were freed, but wouldn't give you a list
of unfreed blocks list. To have such a list use a
--debug or --debug-memory command line arguments.
Debug builds does have the same behavior as release
builds. This is so tools like valgrind are not
screwed up by guarded allocator as they're currently
are.
--
svn merge -r59941:59942 -r60072:60073 -r60093:60094 \
-r60095:60096 ^/branches/soc-2013-depsgraph_mt
|
|
- Tweaked typedefs in stdint so they match
what we've got in BLI_sys_types (needed to
explicitly tell sign to MSVC).
Not so much harmful to be more explicit here,
but we really better to have single stdint
int blender.
- Tweaked allocations macros so MSVC is happy
with structures allocation.
|
|
Also made libmv-capi use guarded objetc allocation.
Run into some suspecious cases when it was not so
clear whether memory is being freed or not.
Now we'll know for sure whether there're leaks or not :)
Having this macros in a guardedalloc header helps
using them in other areas (for now it's OCIO and libmv,
but in the future it'll be more places).
|
|
|
|
from checking if resulting pointers alias existing pointers, also use sentinel attribute for uiButGetStrInfo so incorrect usage gives a warning.
|
|
|
|
allocs have an ID, changing existing functions signatures would be too disruptive at the moment.
|
|
remove MEM_sys_types.h which was a duplicate.
|
|
a different function signature. (which evidently works but error prone).
|
|
also add asserts for listbase functions when the list is NULL, and use noreturn attribute for jpeg_error.
|
|
|
|
memory for loaded fonts, not store as a temp var in the fonts.
|
|
|
|
attribute.
|
|
named drarnode.c and node_draw.c.
|
|
|
|
|
|
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.
|
|
|
|
|
|
doesn't print warning messages.
|
|
functions with a macro.
|
|
without the underscores these clogged up the namespace for autocompleation which was annoying.
|
|
http://markmail.org/message/fp7ozcywxum3ar7n
|
|
also use <> for system includes
|
|
fixes around license blocks
|
|
MEM_guardedalloc.h also shows in docs
|
|
|
|
CWD was longer then 160.
|
|
- enabling/disabling no longer prints in the terminal unless in debug mode.
- remove 'header' struct from BLI_storage_types.h, from revision 2 and is not used.
- Add GCC property to guardedalloc to warn if the return value from allocation functions isn't used.
|
|
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.
|
|
|
|
|
|
|
|
- one function missed in header causes compile problems (intern/guardedalloc/intern/mallocn.c:352: error: conflicting types for ‘MEM_mapallocN’)
|
|
|
|
from Sean Bartell (wtachi)
added own changes bpy_props.c
|
|
|
|
not as optimized as a system realloc but I've had to do this often enough
manually to justify a utility function.
|
|
returns 0 if pointer is not in memlist
|
|
void MEM_callbackmemlist(void (*func)(void*));
Will call the function passed as argument with all allocated address as parameter. Useful for debuging.
|
|
|