diff options
author | osa <osa@FreeBSD.org> | 2003-06-21 20:32:55 +0000 |
---|---|---|
committer | osa <osa@FreeBSD.org> | 2003-06-21 20:32:55 +0000 |
commit | 00d522b5ccd518c5c8d8e9124c5c403a9026e8eb (patch) | |
tree | 6db8ea91e99215eb4c5f720ffab2724176ff6085 | |
parent | 177d219e3560fc1b11d4383bcad8f040d1dc88e4 (diff) | |
download | FreeBSD-ports-00d522b5ccd518c5c8d8e9124c5c403a9026e8eb.zip FreeBSD-ports-00d522b5ccd518c5c8d8e9124c5c403a9026e8eb.tar.gz |
Add libhoard - fast, scalable and memory-efficient
allocator for multiprocessors.
Approved by: fjoe (mentor) (implicit)
-rw-r--r-- | devel/Makefile | 1 | ||||
-rw-r--r-- | devel/libhoard/Makefile | 52 | ||||
-rw-r--r-- | devel/libhoard/distinfo | 1 | ||||
-rw-r--r-- | devel/libhoard/files/patch-Makefile.common | 77 | ||||
-rw-r--r-- | devel/libhoard/files/testos.c | 16 | ||||
-rw-r--r-- | devel/libhoard/pkg-descr | 15 | ||||
-rw-r--r-- | devel/libhoard/pkg-plist | 5 |
7 files changed, 167 insertions, 0 deletions
diff --git a/devel/Makefile b/devel/Makefile index 22af1bd..967fc65 100644 --- a/devel/Makefile +++ b/devel/Makefile @@ -330,6 +330,7 @@ SUBDIR += libgtop SUBDIR += libgtop2 SUBDIR += libhash + SUBDIR += libhoard SUBDIR += libical SUBDIR += libmba SUBDIR += libmcve diff --git a/devel/libhoard/Makefile b/devel/libhoard/Makefile new file mode 100644 index 0000000..ea580ff --- /dev/null +++ b/devel/libhoard/Makefile @@ -0,0 +1,52 @@ +# New ports collection makefile for: libhoard +# Date created: May 24, 2003 +# Whom: Sergey A. Osokin <osa@FreeBSD.org> +# +# $FreeBSD$ +# + +PORTNAME= libhoard +PORTVERSION= 2.1.2d +CATEGORIES= devel +MASTER_SITES= http://www.cs.umass.edu/~emery/software/ + +MAINTAINER= osa@FreeBSD.org +COMMENT= Fast, scalable and memory-efficient allocator for MP + +USE_GMAKE= yes +MAKE_ENV= USE_FREEBSD=1 \ + PTHREAD_CFLAGS="${PTHREAD_CFLAGS}" \ + PTHREAD_LIBS="${PTHREAD_LIBS}" +INSTALLS_SHLIB= YES + +.include <bsd.port.pre.mk> + +TESTPROG= testos + +check-os: +.if !defined(SKIP_OS_TEST) + -@${MKDIR} ${WRKSRC} ; \ + ${RM} -f ${WRKSRC}/${TESTPROG} ; \ + ${CC} ${PTHREAD_CFLAGS} ${PTHREAD_LIBS} -o ${WRKSRC}/${TESTPROG} \ + ${PATCHDIR}/${TESTPROG}.c > /dev/null 2>&1 ; + @if [ ! -f ${WRKSRC}/${TESTPROG} ] ; \ + then \ + ${ECHO_MSG} "You must have a version of FreeBSD later than 4.8-STABLE" ; \ + ${ECHO_MSG} "27 May 2003 or 5.1-RELEASE to compile and use libhoard" ; \ + exit 1 ; \ + fi + @${WRKSRC}/${TESTPROG} 2>/dev/null +.endif + +pre-fetch: check-os + +do-install: + ${INSTALL_DATA} ${WRKSRC}/libhoard.so ${PREFIX}/lib/libhoard.so.1 + ${LN} -sf ${PREFIX}/lib/libhoard.so.1 ${PREFIX}/lib/libhoard.so +.if !defined(NOPORTDOCS) + ${INSTALL} -d -m 0755 ${DOCSDIR} + ${INSTALL_DATA} ${WRKSRC}/README ${DOCSDIR} + ${INSTALL_DATA} ${WRKSRC}/docs/asplos2000.pdf ${DOCSDIR} +.endif + +.include <bsd.port.post.mk> diff --git a/devel/libhoard/distinfo b/devel/libhoard/distinfo new file mode 100644 index 0000000..372d76a --- /dev/null +++ b/devel/libhoard/distinfo @@ -0,0 +1 @@ +MD5 (libhoard-2.1.2d.tar.gz) = fd0247f3ec28f507e2eb6b437263fcfe diff --git a/devel/libhoard/files/patch-Makefile.common b/devel/libhoard/files/patch-Makefile.common new file mode 100644 index 0000000..7834d41 --- /dev/null +++ b/devel/libhoard/files/patch-Makefile.common @@ -0,0 +1,77 @@ +--- Makefile.common.orig Mon Apr 7 19:57:11 2003 ++++ Makefile.common Sun May 25 12:53:38 2003 +@@ -21,8 +21,17 @@ + # or supply new values as parameters to make, e.g.: + # make USE_WINDOWS=1 DEBUG=1 + ++ifeq ($(OSTYPE),freebsd) ++USE_FREEBSD = 1 ++USE_LINUX = 0 ++USE_HPUX = 0 ++USE_WINDOWS = 0 ++USE_SOLARIS = 0 ++UNIX = 1 ++endif + + ifeq ($(OSTYPE),hpux) ++USE_FREEBSD = 0 + USE_LINUX = 0 + USE_HPUX = 1 + USE_WINDOWS = 0 +@@ -31,6 +40,7 @@ + endif + + ifeq ($(OSTYPE),linux) ++USE_FREEBSD = 0 + USE_HPUX = 0 + USE_LINUX = 1 # Linux + USE_WINDOWS = 0 +@@ -39,6 +49,7 @@ + endif + + ifeq ($(OSTYPE),linux-gnu) ++USE_FREEBSD = 0 + USE_HPUX = 0 + USE_LINUX = 1 # Linux + USE_WINDOWS = 0 +@@ -47,6 +58,7 @@ + endif + + ifeq ($(OSTYPE),solaris) ++USE_FREEBSD = 0 + USE_HPUX = 0 + USE_LINUX = 0 + USE_WINDOWS = 0 +@@ -55,6 +67,7 @@ + endif + + ifeq ($(OS),Windows_NT) ++USE_FREEBSD = 0 + USE_HPUX = 0 + USE_LINUX = 0 + USE_WINDOWS = 1 +@@ -109,6 +122,15 @@ + # LIBSO = $(CC) -shared + endif + ++ifeq ($(USE_FREEBSD),1) ++ GNUC = 1 ++ VPATH = ../run-freebsd ++ FEATURES = ${PTHREAD_FLAGS} ++ LIBS = ${PTHREAD_LIBS} ++ UNIX = 1 ++endif ++ ++ + ifdef BROKEN + CPATH = /usr/bin/ + endif +@@ -127,7 +149,7 @@ + ifdef GNUC + CC = $(CPATH)gcc + CXX = $(CPATH)g++ +- FEATURES = -fPIC -D__STRICT_ANSI__ -D_GNU_SOURCE -D_REENTRANT -Wall -fno-exceptions #-fPIC ++ FEATURES = -fPIC -D__STRICT_ANSI__ -D_GNU_SOURCE -D_REENTRANT -Wall -fno-exceptions -Wno-deprecated + OPTIMIZE = -O6 -fexpensive-optimizations -finline-functions -fomit-frame-pointer -ffast-math + FEATURESXX = $(FEATURES) + OPTIMIZEXX = $(OPTIMIZE) diff --git a/devel/libhoard/files/testos.c b/devel/libhoard/files/testos.c new file mode 100644 index 0000000..c4413db --- /dev/null +++ b/devel/libhoard/files/testos.c @@ -0,0 +1,16 @@ +#include <pthread.h> +#include <stdio.h> +#include <stdlib.h> + +int +main(int argc, char *argv[]) +{ + static int level; + + level = pthread_getconcurrency(); + (void)pthread_setconcurrency(level++); + + printf("LIBC_R TEST PASSED: All ok\n"); + + exit(0); +} diff --git a/devel/libhoard/pkg-descr b/devel/libhoard/pkg-descr new file mode 100644 index 0000000..632ca0e3 --- /dev/null +++ b/devel/libhoard/pkg-descr @@ -0,0 +1,15 @@ +The Hoard memory allocator is a fast, scalable, and memory-efficient +memory allocator for shared-memory multiprocessors. + +Multithreaded programs that perform dynamic memory allocation do not +scale because the heap is a bottleneck. When multiple threads +simultaneously allocate or deallocate memory from the heap, they will +be serialized while waiting for the heap lock. Programs making +intensive use of the heap actually slow down as the number of +processors increases. (Note: If you make a lot of use of the STL, you +may not know it, but you are making a lot of use of the heap.) + +Hoard is a fast allocator that solves this problem. In addition, it +has very reasonable bounds on memory consumption. + +WWW: http://www.hoard.org/ diff --git a/devel/libhoard/pkg-plist b/devel/libhoard/pkg-plist new file mode 100644 index 0000000..0101054 --- /dev/null +++ b/devel/libhoard/pkg-plist @@ -0,0 +1,5 @@ +lib/libhoard.so +lib/libhoard.so.1 +%%PORTDOCS%%%%DOCSDIR%%/README +%%PORTDOCS%%%%DOCSDIR%%/asplos2000.pdf +%%PORTDOCS%%@dirrm %%DOCSDIR%% |