ports/170324: New port: devel/lockfree-malloc The world is first Web-scale memory allocator

Veniamin Gvozdikov g.veniamin at googlemail.com
Thu Aug 2 11:30:14 UTC 2012


>Number:         170324
>Category:       ports
>Synopsis:       New port: devel/lockfree-malloc The world is first Web-scale memory allocator
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Thu Aug 02 11:30:13 UTC 2012
>Closed-Date:
>Last-Modified:
>Originator:     Veniamin Gvozdikov
>Release:        FreeBSD 8.2-RELEASE
>Organization:
>Environment:
FreeBSD ololo 8.2-RELEASE FreeBSD 8.2-RELEASE #0: Thu Aug 18 11:19:07 MSD 2011     root at ololo:/usr/obj/usr/src/sys/OLOLO  amd64

>Description:
Here are the advantages of our allocator:

* It's thread-friendly. It supports a practically-unlimited number of
concurrent threads, without locking or performance degradation.
* It's efficient, especially in a multi-threaded environment. Compared to
a stock libc allocator, we see a significant performance boost.
* It does NOT fragment or leak memory, unlike a stock libc allocator.
* It wastes less memory. For small objects (less than 8kb in size), the
overhead is around 0 bytes. (!)
* It is designed from the ground-up for 64-bit architectures.
* It is elegant. The whole codebase is only around 800 lines of fairly
clean C++. (!)
* It fully stand-alone; it does not rely on pthreads or libc at runtime.
>How-To-Repeat:

>Fix:
# This is a shell archive.  Save it in a file, remove anything before
# this line, and then unpack it by entering "sh file".  Note, it may
# create directories; files and directories will be owned by you and
# have default permissions.
#
# This archive contains:
#
#	lockfree-malloc
#	lockfree-malloc/Makefile
#	lockfree-malloc/distinfo
#	lockfree-malloc/pkg-descr
#
echo c - lockfree-malloc
mkdir -p lockfree-malloc > /dev/null 2>&1
echo x - lockfree-malloc/Makefile
sed 's/^X//' >lockfree-malloc/Makefile << '51543b24c3fd1bf68fd29645c1f70ab9'
X# New ports collection makefile for:	lockfree-malloc
X# Date created:		2012-08-01
X# Whom:			Gvozdikov Veniamin <g.veniamin at googlemail.com>
X#
X# $FreeBSD$
X#
X
XPORTNAME=	lockfree-malloc
XPORTVERSION=	0.0.${DATE}
XCATEGORIES=	devel
XMASTER_SITES=	http://fbsd.zlonet.ru/distfiles/
X
XMAINTAINER=	g.veniamin at googlemail.com
XCOMMENT=	The world is first Web-scale memory allocator
X
XLICENSE=	LGPL3
X
XDATE=		20120802
XONLY_FOR_ARCHS=	amd64
XUSE_LDCONFIG=	yes
XUSE_BZIP2=	yes
X
XOPTIONS=	DOCS	"Install README." on
X
XPLIST_FILES=	lib/liblite-malloc-shared.so \
X		lib/liblite-malloc-static.a
X
X.include <bsd.port.pre.mk>
X
X.if defined(WITH_DOCS)
XPLIST_FILES+=	share/doc/${PORTNAME}/README
XPLIST_DIRS+=	share/doc/${PORTNAME}
X.endif
X
Xdo-install:
X.for i in shared.so static.a
X	${INSTALL_LIB} ${WRKSRC}/liblite-malloc-${i} ${PREFIX}/lib/liblite-malloc-${i}
X.endfor
Xpost-install:
X.if defined(WITH_DOCS)
X	${MKDIR} ${DOCSDIR}
X	cd ${WRKSRC} && ${INSTALL_DATA} README ${DOCSDIR}
X.endif
X
X.include <bsd.port.post.mk>
51543b24c3fd1bf68fd29645c1f70ab9
echo x - lockfree-malloc/distinfo
sed 's/^X//' >lockfree-malloc/distinfo << 'b53e9d7416b9805d1fdb3875389bd85c'
XSHA256 (lockfree-malloc-0.0.20120802.tar.bz2) = 5b4ba8683fd0d02f1415d785d7fa04a41b1e3def8a1b690f434877d3931b16ea
XSIZE (lockfree-malloc-0.0.20120802.tar.bz2) = 41121
b53e9d7416b9805d1fdb3875389bd85c
echo x - lockfree-malloc/pkg-descr
sed 's/^X//' >lockfree-malloc/pkg-descr << 'cb85b84006aa6a630ca87fe6516addac'
XHere are the advantages of our allocator:
X
X* It's thread-friendly. It supports a practically-unlimited number of
Xconcurrent threads, without locking or performance degradation.
X* It's efficient, especially in a multi-threaded environment. Compared to
Xa stock libc allocator, we see a significant performance boost.
X* It does NOT fragment or leak memory, unlike a stock libc allocator.
X* It wastes less memory. For small objects (less than 8kb in size), the
Xoverhead is around 0 bytes. (!)
X* It is designed from the ground-up for 64-bit architectures.
X* It is elegant. The whole codebase is only around 800 lines of fairly
Xclean C++. (!)
X* It fully stand-alone; it does not rely on pthreads or libc at runtime.
X
XWWW:	https://github.com/Begun/lockfree-malloc
cb85b84006aa6a630ca87fe6516addac
exit


>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the freebsd-ports-bugs mailing list