Doug Lea's malloc library.
Submitted by: Ollivier Robert <Ollivier.Robert@keltia.frmug.fr.net>
This commit is contained in:
parent
0bcde877d5
commit
0e5ad9aa59
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=1821
7 changed files with 150 additions and 0 deletions
26
devel/libdlmalloc/Makefile
Normal file
26
devel/libdlmalloc/Makefile
Normal file
|
@ -0,0 +1,26 @@
|
|||
# New ports collection makefile for: Doug Lea malloc library
|
||||
# Version required: 2.5.3b
|
||||
# Date created: 3 June 1995
|
||||
# Whom: roberto
|
||||
#
|
||||
# $Id$
|
||||
#
|
||||
|
||||
DISTNAME= dlmalloc
|
||||
PKGNAME= dlmalloc-2.5.3b
|
||||
CATEGORIES+= development programming libraries
|
||||
MASTER_SITES= ftp://gee.cs.oswego.edu/pub/misc/
|
||||
DISTFILES= malloc-2.5.3b.c
|
||||
|
||||
MAINTAINER= roberto@FreeBSD.ORG
|
||||
|
||||
NO_WRKSUBDIR= yes
|
||||
NO_CONFIGURE= yes
|
||||
|
||||
do-extract:
|
||||
@rm -rf ${WRKDIR}
|
||||
@mkdir -p ${WRKDIR}
|
||||
cp -p ${DISTDIR}/${DISTFILES} ${WRKDIR}
|
||||
cp -p ${FILESDIR}/Makefile ${WRKDIR}
|
||||
|
||||
.include <bsd.port.mk>
|
1
devel/libdlmalloc/distinfo
Normal file
1
devel/libdlmalloc/distinfo
Normal file
|
@ -0,0 +1 @@
|
|||
MD5 (malloc-2.5.3b.c) = 7936180a964854d052ae13ce6e1015d7
|
59
devel/libdlmalloc/files/Makefile
Normal file
59
devel/libdlmalloc/files/Makefile
Normal file
|
@ -0,0 +1,59 @@
|
|||
# Makefile for Doug Lea's malloc
|
||||
#
|
||||
# (largely based on Mark Moreas' Makefile)
|
||||
#
|
||||
# Renamed dlmalloc
|
||||
#
|
||||
# A version of malloc/free/realloc written by Doug Lea and released to the
|
||||
# public domain.
|
||||
#
|
||||
# preliminary VERSION 2.5.3b
|
||||
#
|
||||
# working version; unreleased.
|
||||
#
|
||||
|
||||
LIBDIR=${PREFIX}/lib
|
||||
|
||||
# for the shared lib stuff
|
||||
VERSION=2.5
|
||||
|
||||
LIBMALLOC=libdlmalloc.a
|
||||
LIBSMALLOC=libdlmalloc.so.${VERSION}
|
||||
|
||||
SRCS = malloc-2.5.3b.c
|
||||
|
||||
OBJS = malloc-2.5.3b.o
|
||||
SOBJS = malloc-2.5.3b.so
|
||||
|
||||
.SUFFIXES:
|
||||
.SUFFIXES: .out .o .po .so .s .S .c .cc .cxx .m .C .f .y .l
|
||||
|
||||
.c.o:
|
||||
${CC} -c ${CFLAGS} $< -o $@
|
||||
|
||||
.c.so:
|
||||
${CC} -c -fpic ${CFLAGS} $< -o $@
|
||||
ld -x -r $@
|
||||
mv a.out $@
|
||||
|
||||
all: ${LIBMALLOC} ${LIBSMALLOC}
|
||||
|
||||
$(LIBMALLOC): $(OBJS)
|
||||
rm -f $(LIBMALLOC)
|
||||
$(AR) $(ARFLAGS) $(LIBMALLOC) $(OBJS)
|
||||
-$(RANLIB) $(LIBMALLOC)
|
||||
|
||||
$(LIBSMALLOC): $(SOBJS)
|
||||
rm -f $(LIBSMALLOC)
|
||||
ld -Bshareable -o $(LIBSMALLOC) $(SOBJS)
|
||||
|
||||
clean:
|
||||
-rm -f *.o \#* *~ *.core a.out gmon.out mon.out onefile.c *.sL prof.out
|
||||
|
||||
install:
|
||||
install -c -m 644 ${LIBMALLOC} $(LIBDIR)
|
||||
-$(RANLIB) $(LIBDIR)/${LIBMALLOC}
|
||||
install -c -m 555 ${LIBSMALLOC} $(LIBDIR)
|
||||
|
||||
malloc-2.5.3b.o: malloc-2.5.3b.c
|
||||
malloc-2.5.3b.so: malloc-2.5.3b.c
|
52
devel/libdlmalloc/files/patch-aa
Normal file
52
devel/libdlmalloc/files/patch-aa
Normal file
|
@ -0,0 +1,52 @@
|
|||
*** malloc-2.5.3b.c.orig Sun Mar 26 10:50:54 1995
|
||||
--- malloc-2.5.3b.c Fri Apr 7 19:21:29 1995
|
||||
***************
|
||||
*** 271,276 ****
|
||||
--- 271,278 ----
|
||||
|
||||
/* preliminaries */
|
||||
|
||||
+ #include <sys/param.h>
|
||||
+
|
||||
#ifndef __STD_C
|
||||
#ifdef __STDC__
|
||||
#define __STD_C 1
|
||||
***************
|
||||
*** 1365,1373 ****
|
||||
}
|
||||
|
||||
|
||||
-
|
||||
/* Derivatives */
|
||||
|
||||
#if __STD_C
|
||||
Void_t* valloc(size_t bytes)
|
||||
#else
|
||||
--- 1367,1375 ----
|
||||
}
|
||||
|
||||
|
||||
/* Derivatives */
|
||||
|
||||
+ #if 0
|
||||
#if __STD_C
|
||||
Void_t* valloc(size_t bytes)
|
||||
#else
|
||||
***************
|
||||
*** 1394,1400 ****
|
||||
while (sz-- > 0) *q++ = 0;
|
||||
return p;
|
||||
}
|
||||
!
|
||||
#if __STD_C
|
||||
void cfree(Void_t *mem)
|
||||
#else
|
||||
--- 1396,1402 ----
|
||||
while (sz-- > 0) *q++ = 0;
|
||||
return p;
|
||||
}
|
||||
! #endif
|
||||
#if __STD_C
|
||||
void cfree(Void_t *mem)
|
||||
#else
|
||||
|
1
devel/libdlmalloc/pkg-comment
Normal file
1
devel/libdlmalloc/pkg-comment
Normal file
|
@ -0,0 +1 @@
|
|||
Small, fast malloc library by Doug Lea, version 2.5.3b.
|
8
devel/libdlmalloc/pkg-descr
Normal file
8
devel/libdlmalloc/pkg-descr
Normal file
|
@ -0,0 +1,8 @@
|
|||
A version of malloc/free/realloc written by Doug Lea and released to the
|
||||
public domain.
|
||||
|
||||
Version 2.5.3b
|
||||
|
||||
Based loosely on libg++-1.2X malloc. (It retains some of the overall
|
||||
structure of old version, but most details differ.)
|
||||
|
3
devel/libdlmalloc/pkg-plist
Normal file
3
devel/libdlmalloc/pkg-plist
Normal file
|
@ -0,0 +1,3 @@
|
|||
lib/libdlmalloc.a
|
||||
@exec ranlib %D/%F
|
||||
lib/libdlmalloc.so.2.5
|
Loading…
Reference in a new issue