Page Menu
Home
GnuPG
Search
Configure Global Search
Log In
Files
F35443976
D431.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Size
1 KB
Subscribers
None
D431.diff
View Options
diff --git a/src/secmem.c b/src/secmem.c
--- a/src/secmem.c
+++ b/src/secmem.c
@@ -454,7 +454,7 @@
/* Initialize first memory block. */
mb = (memblock_t *) pool->mem;
- mb->size = pool->size;
+ mb->size = pool->size - BLOCK_HEAD_SIZE;
mb->flags = 0;
}
@@ -610,7 +610,7 @@
mb = mb_get_new (pool, (memblock_t *) pool->mem, size);
if (mb)
{
- stats_update (pool, size, 0);
+ stats_update (pool, mb->size, 0);
return &mb->aligned.c;
}
@@ -624,7 +624,7 @@
mb = mb_get_new (pool, (memblock_t *) pool->mem, size);
if (mb)
{
- stats_update (pool, size, 0);
+ stats_update (pool, mb->size, 0);
return &mb->aligned.c;
}
}
@@ -641,7 +641,7 @@
return NULL; /* Not enough memory available for a new pool. */
/* Initialize first memory block. */
mb = (memblock_t *) pool->mem;
- mb->size = pool->size;
+ mb->size = pool->size - BLOCK_HEAD_SIZE;
mb->flags = 0;
pool->okay = 1;
@@ -660,7 +660,7 @@
mb = mb_get_new (pool, (memblock_t *) pool->mem, size);
if (mb)
{
- stats_update (pool, size, 0);
+ stats_update (pool, mb->size, 0);
return &mb->aligned.c;
}
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Feb 7, 2:26 PM (17 h, 8 m)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
f1/28/629209c7695ff427990fc0d365de
Attached To
D431: secmem fix
Event Timeline
Log In to Comment