Re: dfc1632da73: Change default MEM_ROOT allocations to decrease calls to malloc
![](https://secure.gravatar.com/avatar/39b623a1559cf9c69ac3d9d4fb44e7fe.jpg?s=120&d=mm&r=g)
Hi, Monty, Please, cherry-pick it into 10.11 and push as bb-10.11-merge. There will be *a lot* of conflicts in memroot code because of your "Added support to MEM_ROOT for write protected memory" change, it'd be best if you resolve your conflicts yourself. On Dec 22, Michael Widenius wrote:
revision-id: dfc1632da73 (mariadb-10.6.20-60-gdfc1632da73) parent(s): 3297680579f author: Michael Widenius committer: Michael Widenius timestamp: 2024-12-17 10:45:25 +0200 message:
Change default MEM_ROOT allocations to decrease calls to malloc ... --- a/mysys/my_alloc.c +++ b/mysys/my_alloc.c @@ -173,7 +180,7 @@ void *alloc_root(MEM_ROOT *mem_root, size_t length) DBUG_ENTER("alloc_root"); - DBUG_PRINT("enter",("root: %p", mem_root)); + DBUG_PRINT("enter",("root: %p length: %ld", mem_root, (long) length));
FYI, my_vsnprintf() supports standard "%zu" to print size_t values. Not important here, of course.
DBUG_ASSERT(alloc_root_inited(mem_root));
Regards, Sergei Chief Architect, MariaDB Server and security@mariadb.org
![](https://secure.gravatar.com/avatar/68cce0b6e372c2c66f4d66c6356102af.jpg?s=120&d=mm&r=g)
Hi! On Sun, Dec 22, 2024 at 5:55 PM Sergei Golubchik <serg@mariadb.org> wrote:
Hi, Monty,
Please, cherry-pick it into 10.11 and push as bb-10.11-merge.
Done. Will push to 10.11 when all tests pass in buildbot.
There will be *a lot* of conflicts in memroot code because of your "Added support to MEM_ROOT for write protected memory" change, it'd be best if you resolve your conflicts yourself.
Yes, there was a few conflicts, but all where easy to resolve. <cut>
--- a/mysys/my_alloc.c +++ b/mysys/my_alloc.c @@ -173,7 +180,7 @@ void *alloc_root(MEM_ROOT *mem_root, size_t length) DBUG_ENTER("alloc_root"); - DBUG_PRINT("enter",("root: %p", mem_root)); + DBUG_PRINT("enter",("root: %p length: %ld", mem_root, (long) length));
FYI, my_vsnprintf() supports standard "%zu" to print size_t values. Not important here, of course.
Fixed. I need to remember to use %zu in the future in other places Regards, Monty
participants (2)
-
Michael Widenius
-
Sergei Golubchik