This commit is contained in:
Greg Burd 2020-06-22 14:21:25 -04:00
parent 0727224086
commit e1eb2c8413
10 changed files with 20 additions and 7 deletions

2
.gitignore vendored
View file

@ -7,6 +7,7 @@ INSTALL
Makefile.in Makefile.in
aclocal.m4 aclocal.m4
autom4te.cache autom4te.cache
compile
config.guess config.guess
config.h.in config.h.in
config.sub config.sub
@ -23,6 +24,7 @@ config.log
config.status config.status
libtool libtool
stamp-h1 stamp-h1
test-driver
umem.spec umem.spec
umem_test umem_test
umem_test1 umem_test1

View file

@ -36,7 +36,10 @@ libumem_la_SOURCES = init_lib.c \
sys/vmem_impl_user.h sys/vmem_impl_user.h
libumem_malloc_la_SOURCES = malloc.c libumem_malloc_la_SOURCES = malloc.c
libumem_malloc_la_LDFLAGS = -lpthread -R$(libdir) -lumem libumem_malloc_la_LDFLAGS = -lpthread -R$(libdir) -lumem
AM_CFLAGS = -fno-builtin-calloc
ACLOCAL_AMFLAGS = -I m4
man3_MANS = umem_alloc.3 umem_cache_create.3 umem_debug.3 man3_MANS = umem_alloc.3 umem_cache_create.3 umem_debug.3
EXTRA_DIST = COPYRIGHT OPENSOLARIS.LICENSE umem.spec Doxyfile umem_test4 \ EXTRA_DIST = COPYRIGHT OPENSOLARIS.LICENSE umem.spec Doxyfile umem_test4 \

2
README
View file

@ -17,7 +17,7 @@ Linux and Windows versions of our product as we have found it to be stable.
We will continue to update this project as and when we make improvements, and We will continue to update this project as and when we make improvements, and
welcome third-party patches that improve the usability for everyone. welcome third-party patches that improve the usability for everyone.
Wez Furlong, Wez Furlong,
Message Systems, Inc. Message Systems, Inc.
wez (at) messagesystems (dot) com wez (at) messagesystems (dot) com

View file

@ -1,5 +1,6 @@
AC_INIT([umem], [1.0.2], [], [umem]) AC_INIT([umem], [1.0.2], [], [umem])
AM_INIT_AUTOMAKE([dist-bzip2]) AM_INIT_AUTOMAKE([dist-bzip2])
AC_CONFIG_MACRO_DIRS([m4])
AC_PROG_CC AC_PROG_CC
AM_PROG_AS AM_PROG_AS
@ -8,8 +9,8 @@ AC_PROG_LIBTOOL
AC_C_INLINE AC_C_INLINE
AC_MSG_CHECKING([whether pthread_mutex_t is larger than 24 bytes]) AC_MSG_CHECKING([whether pthread_mutex_t is larger than 24 bytes])
AC_TRY_RUN( AC_TRY_RUN(
[ [
#include <pthread.h> #include <pthread.h>
int main(void){return (sizeof(pthread_mutex_t) > 24);} int main(void){return (sizeof(pthread_mutex_t) > 24);}
], ],
@ -19,7 +20,7 @@ int main(void){return (sizeof(pthread_mutex_t) > 24);}
AC_DEFINE(UMEM_PTHREAD_MUTEX_TOO_BIG, [1], [need bigger cache]) AC_DEFINE(UMEM_PTHREAD_MUTEX_TOO_BIG, [1], [need bigger cache])
AC_MSG_WARN([*** increasing umem cpu cache size to compensate.]) AC_MSG_WARN([*** increasing umem cpu cache size to compensate.])
] ]
) )
AC_CHECK_LIB(dl,dlopen) AC_CHECK_LIB(dl,dlopen)

1
m4/libtool.m4 vendored Symbolic link
View file

@ -0,0 +1 @@
/usr/share/aclocal/libtool.m4

1
m4/ltoptions.m4 vendored Symbolic link
View file

@ -0,0 +1 @@
/usr/share/aclocal/ltoptions.m4

1
m4/ltsugar.m4 vendored Symbolic link
View file

@ -0,0 +1 @@
/usr/share/aclocal/ltsugar.m4

1
m4/ltversion.m4 vendored Symbolic link
View file

@ -0,0 +1 @@
/usr/share/aclocal/ltversion.m4

1
m4/lt~obsolete.m4 vendored Symbolic link
View file

@ -0,0 +1 @@
/usr/share/aclocal/lt~obsolete.m4

View file

@ -4,10 +4,13 @@
#include "umem.h" #include "umem.h"
#define UMEM_STANDALONE 1
#include "umem_impl.h"
int main(int argc, char *argv[]) int main(int argc, char *argv[])
{ {
char *foo; char *foo;
umem_startup(NULL, 0, 0, NULL, NULL); umem_startup(NULL, 0, 0, NULL, NULL);
foo = umem_alloc(32, UMEM_DEFAULT); foo = umem_alloc(32, UMEM_DEFAULT);
@ -20,4 +23,3 @@ int main(int argc, char *argv[])
return EXIT_SUCCESS; return EXIT_SUCCESS;
} }