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
diff options
context:
space:
mode:
authorBrecht Van Lommel <brecht@blender.org>2020-05-20 01:24:26 +0300
committerBrecht Van Lommel <brecht@blender.org>2020-05-20 01:57:41 +0300
commit120e9924c177c7a8fde06b9c5eca98e4e2a19180 (patch)
tree5344dd2317ecde11be30a72f74b6ceef013c9463 /source/blender/imbuf
parent33fc42bd6523c0cd45091e4690e7605604ec4a12 (diff)
Cleanup: remove legacy mmap memory allocation for 32 bit
This helped to go beyond the 4GB limit, but is no longer relevant for 64 bit.
Diffstat (limited to 'source/blender/imbuf')
-rw-r--r--source/blender/imbuf/intern/allocimbuf.c2
-rw-r--r--source/blender/imbuf/intern/cache.c4
-rw-r--r--source/blender/imbuf/intern/divers.c2
-rw-r--r--source/blender/imbuf/intern/openexr/openexr_api.cpp4
4 files changed, 6 insertions, 6 deletions
diff --git a/source/blender/imbuf/intern/allocimbuf.c b/source/blender/imbuf/intern/allocimbuf.c
index 6c17254e697..4b3858e6d5a 100644
--- a/source/blender/imbuf/intern/allocimbuf.c
+++ b/source/blender/imbuf/intern/allocimbuf.c
@@ -380,7 +380,7 @@ void *imb_alloc_pixels(
}
size_t size = (size_t)x * (size_t)y * (size_t)channels * typesize;
- return MEM_mapallocN(size, name);
+ return MEM_callocN(size, name);
}
bool imb_addrectfloatImBuf(ImBuf *ibuf)
diff --git a/source/blender/imbuf/intern/cache.c b/source/blender/imbuf/intern/cache.c
index 176b41d2706..23ce9bd7818 100644
--- a/source/blender/imbuf/intern/cache.c
+++ b/source/blender/imbuf/intern/cache.c
@@ -427,8 +427,8 @@ void IMB_tiles_to_rect(ImBuf *ibuf)
/* don't call imb_addrectImBuf, it frees all mipmaps */
if (!mipbuf->rect) {
- if ((mipbuf->rect = MEM_mapallocN(ibuf->x * ibuf->y * sizeof(unsigned int),
- "imb_addrectImBuf"))) {
+ if ((mipbuf->rect = MEM_callocN(ibuf->x * ibuf->y * sizeof(unsigned int),
+ "imb_addrectImBuf"))) {
mipbuf->mall |= IB_rect;
mipbuf->flags |= IB_rect;
}
diff --git a/source/blender/imbuf/intern/divers.c b/source/blender/imbuf/intern/divers.c
index e068a84aab0..bcc8488089d 100644
--- a/source/blender/imbuf/intern/divers.c
+++ b/source/blender/imbuf/intern/divers.c
@@ -788,7 +788,7 @@ void IMB_float_from_rect(ImBuf *ibuf)
size = size * 4 * sizeof(float);
ibuf->channels = 4;
- rect_float = MEM_mapallocN(size, "IMB_float_from_rect");
+ rect_float = MEM_callocN(size, "IMB_float_from_rect");
if (rect_float == NULL) {
return;
diff --git a/source/blender/imbuf/intern/openexr/openexr_api.cpp b/source/blender/imbuf/intern/openexr/openexr_api.cpp
index 62cc2e605e5..882808cbc14 100644
--- a/source/blender/imbuf/intern/openexr/openexr_api.cpp
+++ b/source/blender/imbuf/intern/openexr/openexr_api.cpp
@@ -1598,8 +1598,8 @@ static ExrHandle *imb_exr_begin_read_mem(IStream &file_stream,
for (lay = (ExrLayer *)data->layers.first; lay; lay = lay->next) {
for (pass = (ExrPass *)lay->passes.first; pass; pass = pass->next) {
if (pass->totchan) {
- pass->rect = (float *)MEM_mapallocN(width * height * pass->totchan * sizeof(float),
- "pass rect");
+ pass->rect = (float *)MEM_callocN(width * height * pass->totchan * sizeof(float),
+ "pass rect");
if (pass->totchan == 1) {
echan = pass->chan[0];
echan->rect = pass->rect;