From: Matthew Fernandez Date: Sat, 11 Jul 2020 20:37:02 +0000 (-0700) Subject: remove now unused Vmdcheap X-Git-Tag: 2.46.0~20^2^2~182^2~16 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=909f1145ded92f9485a8a8a6cc4c1039c795826b;p=graphviz remove now unused Vmdcheap --- diff --git a/lib/vmalloc/CMakeLists.txt b/lib/vmalloc/CMakeLists.txt index 69d2a976a..9bdd5087e 100644 --- a/lib/vmalloc/CMakeLists.txt +++ b/lib/vmalloc/CMakeLists.txt @@ -9,7 +9,6 @@ add_library(vmalloc STATIC vmbest.c vmclear.c vmclose.c - vmdcheap.c vmopen.c vmstrdup.c ) diff --git a/lib/vmalloc/Makefile.am b/lib/vmalloc/Makefile.am index f561cf6a2..eeb0c10a8 100644 --- a/lib/vmalloc/Makefile.am +++ b/lib/vmalloc/Makefile.am @@ -4,7 +4,7 @@ noinst_HEADERS = vmalloc.h vmhdr.h noinst_LTLIBRARIES = libvmalloc_C.la -libvmalloc_C_la_SOURCES = vmbest.c vmclear.c vmclose.c vmdcheap.c \ +libvmalloc_C_la_SOURCES = vmbest.c vmclear.c vmclose.c \ vmopen.c \ vmstrdup.c diff --git a/lib/vmalloc/vmalloc.h b/lib/vmalloc/vmalloc.h index 8ef85d717..9f7f6aba6 100644 --- a/lib/vmalloc/vmalloc.h +++ b/lib/vmalloc/vmalloc.h @@ -101,7 +101,6 @@ extern "C" { extern Vmethod_t *Vmbest; /* best allocation */ - extern Vmdisc_t *Vmdcheap; /* heap discipline */ extern Vmdisc_t *Vmdcsbrk; /* sbrk discipline */ extern Vmalloc_t *Vmheap; /* heap region */ diff --git a/lib/vmalloc/vmalloc.vcxproj b/lib/vmalloc/vmalloc.vcxproj index 6a3d0b02d..9df5a9229 100644 --- a/lib/vmalloc/vmalloc.vcxproj +++ b/lib/vmalloc/vmalloc.vcxproj @@ -99,7 +99,6 @@ - diff --git a/lib/vmalloc/vmalloc.vcxproj.filters b/lib/vmalloc/vmalloc.vcxproj.filters index fb0014412..ef5eee1c5 100644 --- a/lib/vmalloc/vmalloc.vcxproj.filters +++ b/lib/vmalloc/vmalloc.vcxproj.filters @@ -32,9 +32,6 @@ Source Files - - Source Files - Source Files diff --git a/lib/vmalloc/vmdcheap.c b/lib/vmalloc/vmdcheap.c deleted file mode 100644 index c1d52e75c..000000000 --- a/lib/vmalloc/vmdcheap.c +++ /dev/null @@ -1,43 +0,0 @@ -/* $Id$ $Revision$ */ -/* vim:set shiftwidth=4 ts=8: */ - -/************************************************************************* - * Copyright (c) 2011 AT&T Intellectual Property - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: See CVS logs. Details at http://www.graphviz.org/ - *************************************************************************/ - -#include "vmhdr.h" - -/* A discipline to get memory from the heap. -** -** Written by Kiem-Phong Vo, kpv@research.att.com, 01/16/94. -*/ -/** - * @param vm region doing allocation from - * @param caddr current low address - * @param csize current size - * @param nsize new size - * @param disc discipline structure - */ -static void *heapmem(Vmalloc_t * vm, void * caddr, - size_t csize, size_t nsize, Vmdisc_t * disc) -{ - NOTUSED(vm); - NOTUSED(disc); - - if (csize == 0) - return vmalloc(Vmheap, nsize); - else if (nsize == 0) - return vmfree(Vmheap, caddr) >= 0 ? caddr : NIL(void *); - else - return vmresize(Vmheap, caddr, nsize, 0); -} - -static Vmdisc_t _Vmdcheap = { heapmem, NIL(Vmexcept_f), 0 }; - -Vmdisc_t* Vmdcheap = &_Vmdcheap;