Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2020-03-19Cleanup: `make format` after SortedIncludes changeDalai Felinto
2020-01-31Fix potential crash in guarded alloc stats, when there are no allocationsJames Fulop
This was found with static analysis warnings in Visual Studio 2019. Differential Revision: https://developer.blender.org/D6564
2020-01-27Memory: add OBJECT_GUARDED_SAFE_DELETE like MEM_SAFE_FREEBrecht Van Lommel
2020-01-27Fix OBJECT_GUARDED_FREE compiler error when type is in namespaceBrecht Van Lommel
2020-01-23Fix: Use a minimal alignment of 8 in MEM_lockfree_mallocN_alignedJacques Lucke
`posix_memalign` requires the `alignment` to be at least `sizeof(void *)`. Previously, `MEM_mallocN_aligned` would simply return `NULL` if a too small `alignment` was used. This was an OS specific issue. The solution is to use a minimal alignment of `8` for all aligned allocations. The unit tests have been extended to test more possible alignments (some of which were broken before). Reviewers: brecht Differential Revision: https://developer.blender.org/D6660
2019-11-06Fix T70952: EXR files bigger than 2GB don't open on WindowsBrecht Van Lommel
2019-10-28CMake: add missing headers, use space before commentsCampbell Barton
2019-09-14Cleanup: clang-formatStefan Werner
2019-09-13macOS: Enabled posix_memalign() like on other Unix platforms.Stefan Werner
2019-08-20Memory: Fix guarded aligned malloc with small alignmentJacques Lucke
When calling `MEM_guarded_mallocN_aligned` with an alignment of 4, a pointer that was returned that is 4 byte but not 8 byte aligned. When freeing this pointer, `MEM_guarded_freeN` thinks that it is an illegal pointer, because it asserts that `((intptr_t)memh) & 0x7 == 0`. The fix is to always use at least 8 byte alignment. Reviewers: brecht Differential Revision: https://developer.blender.org/D5529
2019-05-01Cleanup: comments (long lines) in various intern/ libsCampbell Barton
2019-04-17ClangFormat: format '#if 0' codeCampbell Barton
Previous cleanups didn't account for space after '#'.
2019-04-17ClangFormat: format '#if 0' code in intern/Campbell Barton
2019-04-17ClangFormat: apply to source, most of internCampbell Barton
Apply clang format as proposed in T53211. For details on usage and instructions for migrating branches without conflicts, see: https://wiki.blender.org/wiki/Tools/ClangFormat
2019-04-14CMake: prepare for BLENDER_SORTED_LIBS removalCampbell Barton
No functional change, this adds LIB definition and args to cmake files. Without this it's difficult to migrate away from 'BLENDER_SORTED_LIBS' since there are many platforms/configurations that could break when changing linking order. Manually add and enable WITHOUT_SORTED_LIBS to try building without sorted libs (currently fails since all variables are empty). This check will eventually be removed. See T46725.
2019-02-18doxygen: add newline after \fileCampbell Barton
While \file doesn't need an argument, it can't have another doxy command after it.
2019-02-18Cleanup: conform headers to have license firstCampbell Barton
Also remove doxy comments for licenses and add missing GPL header.
2019-02-06Cleanup: remove redundant doxygen \file argumentCampbell Barton
Move \ingroup onto same line to be more compact and make it clear the file is in the group.
2019-02-05Cleanup: remove contributors for CMake filesCampbell Barton
Following removal from C source code. See: 8c68ed6df16d8893
2019-02-02Cleanup: remove author/date info from doxy headersCampbell Barton
2019-02-01Cleanup: remove redundant, invalid info from headersCampbell Barton
BF-admins agree to remove header information that isn't useful, to reduce noise. - BEGIN/END license blocks Developers should add non license comments as separate comment blocks. No need for separator text. - Contributors This is often invalid, outdated or misleading especially when splitting files. It's more useful to git-blame to find out who has developed the code. See P901 for script to perform these edits.
2019-01-24Cleanup: trailing space guardedalloc & memutilCampbell Barton
2019-01-11MSVC: remove compiler __func__ defineCampbell Barton
No longer needed and exposes a bug in clang-format see: D4185
2018-10-03Fix build with older CMake versions that we still need to support.Brecht Van Lommel
2018-10-03Fix T54287: memory not freed after rendering on Linux.Brecht Van Lommel
With new jemalloc versions memory allocated by threads that then become inactive is not longer automatically freed. Instead we have to enable a background thread to do it. Some testing is needed to find out of this is sufficient, because the background thread only runs periodically.
2018-05-23Fix incorrect size in aligned lockfree reallocCampbell Barton
Thanks to @alikendarfen for finding.
2018-05-22Memory allocator: use lockfree calls internallyCampbell Barton
Was already used in some areas.
2018-03-20Memory allocator: Clarify consistency check functionSergey Sharybin
Also make it to return truth when everything is good and false otherwise.
2018-01-17Memory: add MEM_malloc_arrayN() function to protect against overflow.Brecht Van Lommel
Differential Revision: https://developer.blender.org/D3002
2017-11-30Haiku OS SupportCampbell Barton
D2860 by @miqlas Even though Haiku is a niche OS, only minor changes are needed.
2017-09-29Drop platform support for Solaris & AIXCampbell Barton
These platforms didn't see maintenance in years. This commit just removes ifdef's & cmake check.
2017-08-23Fix implementation of atomic update max and move to a central locationMai Lavelle
While unlikely to have had any serious effects because of limited use, the previous implementation was not actually atomic due to a data race and incorrectly coded CAS loop. We also had duplicates of this code in a few places, it's now been moved to a single location with all other atomic operations.
2017-06-17Guarded allocator: Fix type in macro definitionSergey Sharybin
The crash did not happen yet because we always had proper vmemh defined in the parent scope. Patch by Ivan Ivanov (aka obiwanus), thanks! Differential Revision: https://developer.blender.org/D2715
2017-05-27Remove MinGW supportAaron Carlisle
The Issue ======= For a long time now MinGW has been unsupported and unmaintained and at this point, it looks like something that we should just leave behind and move on. Why Remove ========== One of the big motivations for MinGW back in the day is that it was free compared to MSVC which was licensed based. However, now that this is no longer true we have basically stopped updating the need CMake files. Along with the CMake files, there are several patches to the extern libs needed to make this work. For example, see: https://developer.blender.org/diffusion/B/browse/master/extern/carve/patches/mingw_w64.patch If we wanted to keep MinGW then we would need to make more custom patches to the external libs and this is not something our platform maintainers are willing to do. For example, here is the patches needed to build python: https://github.com/Alexpux/MINGW-packages/tree/master/mingw-w64-python3 Fixes T51301 Differential Revision: https://developer.blender.org/D2648
2016-11-15Atomics: Make naming more obvious about which value is being returnedSergey Sharybin
2016-07-14Cleanup: comment blocksCampbell Barton
2016-01-04Remove SCons building systemSergey Sharybin
While SCons building system was serving us really good for ages it's no longer having much attention by the developers and started to become quite a difficult task to maintain. What's even worse -- there started to be quite serious divergence between SCons and CMake which was only accumulating over the releases now. The fact that none of the active developers are really using SCons and that our main studio is also using CMake spotting bugs in the SCons builds became quite a difficult task and we aren't always spotting them in time. Meanwhile CMake became really mature building system which is available on every platform we support and arguably it's also easier and more robust to use. This commit includes: - Removal of actual SCons building system - Removal of SCons git submodule - Removal of documentation which is stored in the sources and covers SCons - Tweaks to the buildbot master to stop using SCons submodule (this change requires deploying to the server) - Tweaks to the install dependencies script to skip installing or mentioning SCons building system - Tweaks to various helper scripts to avoid mention of SCons folders/files as well Reviewers: mont29, dingto, dfelinto, lukastoenne, lukasstockner97, brecht, Severin, merwin, aligorith, psy-fi, campbellbarton, juicyfruit Reviewed By: campbellbarton, juicyfruit Differential Revision: https://developer.blender.org/D1680
2015-06-21Support for platforms /wo malloc_usable_sizeCampbell Barton
Was only used for stats, netbsd doesn't define this function.
2015-04-20Guardedalloc: Don't use aligned blocks to calculate memory sloppynessSergey Sharybin
Aligned memory is allocated with memalign() and malloc_usable_size() can't be used to measure this block.
2015-03-12GuardedAlloc: safer MEM_SAFE_FREECampbell Barton
only instantiate the argument once, so MEM_SAFE_FREE(array[i++]), won't cause incorrect behavior.
2015-02-19Guardedalloc: Reset peak memory should set peak to currently allocated memorySergey Sharybin
Otherwise statistics could be really funny looking.
2015-02-18Guardedalloc: Add extra logging and checks in MEM_freeN()Sergey Sharybin
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.
2014-10-14Fix inconsistent types in guardeallocDan Horák
This basically fixes mix of size_t and uintptr_t usages which might be different size.
2014-10-09Enable atomic peak memory detectionSergey Sharybin
This gives more precise information about memory usage which might be real handy when doing memory optimization. It works good here for as long as i can tell but if for some reason you'll be experiencing some weird slowdown please let me know.
2014-09-26Fix build errors in atomic ops and warning in aligned malloc on OS X.Brecht Van Lommel
2014-09-25Guardedalloc: Implement atomic peak memory updateSergey Sharybin
Updating maximum requires a bit of a cycle which usually does 1 iteration only, sometimes needs a bit more but seems there's no speed regressions. For now the code is commented out. This way it's easier for others to verify there's no speed regressions. Reviewers: campbellbarton Differential Revision: https://developer.blender.org/D626
2014-08-16CommentsCampbell Barton
2014-07-25Fix inconsistent use of print_error() and fprintf(stderr, ...) in ↵Tamito Kajiyama
MEM_guarded_printmemlist_internal(). Also extended the size of buf[] in print_error() to prevent mem_printmemlist_pydict_script[] from getting truncated when MEM_printmemlist_pydict() is used. Differential revision: https://developer.blender.org/D675 Reviewed by: Campbell Barton
2014-06-16I'd tend to declare dead code is forbiddenSergey Sharybin
All this code blocks commented out with UNUSED comment are really useless.
2014-06-14Comment unused macroCampbell Barton