diff options
author | Campbell Barton <ideasman42@gmail.com> | 2016-07-08 07:32:29 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2016-07-08 07:36:55 +0300 |
commit | a02915c0f3b9b24f615fc7e4b8f491106a52dee0 (patch) | |
tree | 9b2b3c9b7881cde005dc8615136d23671c4eb221 /source | |
parent | a92fc348f46755c34023eff4fc1d7f467241c616 (diff) |
writefile: optimize undo memory use
Slop-space on Linux wasted ~20% of memory for undo storage.
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/blenloader/intern/writefile.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/blenloader/intern/writefile.c b/source/blender/blenloader/intern/writefile.c index a761a56a42d..bd19f2aeb74 100644 --- a/source/blender/blenloader/intern/writefile.c +++ b/source/blender/blenloader/intern/writefile.c @@ -191,9 +191,9 @@ /* ********* my write, buffered writing with minimum size chunks ************ */ -#define MYWRITE_BUFFER_SIZE 100000 -#define MYWRITE_MAX_CHUNK 32768 - +/* Use optimal allocation since blocks of this size are kept in memory for undo. */ +#define MYWRITE_BUFFER_SIZE (MEM_SIZE_OPTIMAL(1 << 17)) /* 128kb */ +#define MYWRITE_MAX_CHUNK (MEM_SIZE_OPTIMAL(1 << 15)) /* ~32kb */ /** \name Small API to handle compression. |