Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Merge branch 'master' of framagit.org:simgrid/simgrid
[simgrid.git] / src / xbt / mmalloc / mmalloc.c
index 6bf8eac..ea99da9 100644 (file)
@@ -1,6 +1,6 @@
 /* Memory allocator `malloc'. */
 
-/* Copyright (c) 2010-2022. The SimGrid Team. All rights reserved.          */
+/* Copyright (c) 2010-2023. The SimGrid Team. All rights reserved.          */
 
 /* This program is free software; you can redistribute it and/or modify it
  * under the terms of the license (GNU LGPL) which comes with this package. */
@@ -102,9 +102,9 @@ static void *register_morecore(struct mdesc *mdp, size_t size)
   void* result = mmalloc_aligned(mdp, size); // Never returns NULL
 
   /* Check if we need to grow the info table (in a multiplicative manner)  */
-  if ((size_t) BLOCK((char *) result + size) > mdp->heapsize) {
+  if (BLOCK((char*)result + size) > mdp->heapsize) {
     size_t newsize = mdp->heapsize;
-    while ((size_t) BLOCK((char *) result + size) > newsize)
+    while (BLOCK((char*)result + size) > newsize)
       newsize *= 2;
 
     /* Copy old info into new location */