]> granicus.if.org Git - graphviz/commitdiff
unconditionally use bestalloc in vmopen()
authorMatthew Fernandez <matthew.fernandez@gmail.com>
Sat, 11 Jul 2020 21:16:14 +0000 (14:16 -0700)
committerMatthew Fernandez <matthew.fernandez@gmail.com>
Sat, 25 Jul 2020 18:53:10 +0000 (11:53 -0700)
This policy is no longer configurable because we simply use the system
allocator, malloc.

lib/vmalloc/vmopen.c

index e79c5689501b5d14d700220445cbd5298c239d86..400b6029a6dc9b7dfe89526c34e7a7d39d7437a6 100644 (file)
 */
 
 /**
- * @param meth method to manage space
+ * @param meth ignored
  */
 Vmalloc_t *vmopen(Vmethod_t *meth) {
   Vmalloc_t *vm;
 
+  (void)meth;
+
   vm = malloc(sizeof(*vm));
   if (vm == NULL) {
     return NULL;
   }
 
-  vm->meth = *meth;
+  vm->meth.allocf = bestalloc;
+  vm->meth.resizef = bestresize;
+  vm->meth.freef = bestfree;
 
   vm->data = calloc(1, sizeof(*vm->data));
   if (vm->data == NULL) {