Bug 235731

Summary: Review Request: openbsd-malloc - Alternative malloc() implementation
Product: [Fedora] Fedora Reporter: Peter Lemenkov <lemenkov>
Component: Package ReviewAssignee: Nobody's working on this, feel free to take it <nobody>
Status: CLOSED NOTABUG QA Contact: Fedora Package Reviews List <fedora-package-review>
Severity: medium Docs Contact:
Priority: medium    
Version: rawhideCC: peter
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2008-06-22 00:32:49 EDT Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
Bug Depends On:    
Bug Blocks: 201449    

Description Peter Lemenkov 2007-04-09 16:19:44 EDT
Spec URL: http://lemenkov.googlepages.com/openbsd-malloc.spec
SRPM URL: http://lemenkov.googlepages.com/openbsd-malloc-0-1.src.rpm

Description: This package contains experimental alternative to glibc
implementation of malloc() which is prone to heap fragmentation
due to use of deprecated brk() syscall; one might find it useful
to reduce e.g. Firefox memory consumption (though reportedly
won't work with e.g. Emacs).

Use openbsd-malloc some-program to run some-program this way.
Comment 1 Peter Gordon 2007-04-09 16:49:41 EDT
Please ensure that your build honors the RPM build flags by adding %{optflags}
(or $RPM_OPT_FLAGS) to the gcc invocation:

%build
gcc -shared -fPIC %{optflags} %{SOURCE0} -o malloc.so
Comment 2 Peter Lemenkov 2007-04-10 00:45:53 EDT
(In reply to comment #1)
> Please ensure that your build honors the RPM build flags by adding %{optflags}
> (or $RPM_OPT_FLAGS) to the gcc invocation:
> 
> %build
> gcc -shared -fPIC %{optflags} %{SOURCE0} -o malloc.so

Done.

http://lemenkov.googlepages.com/openbsd-malloc.spec
http://lemenkov.googlepages.com/openbsd-malloc-0-2.src.rpm
Comment 4 Ralf Corsepius 2007-04-11 02:34:09 EDT
Some remarks:

1. MUSTFIX:

This spec doesn't apply $RPM_BUILD_ROOT. It compiles and places its files
directly into */BUILD.

One way to approach this:
%setup -c -T

2. Is there an agreement with the glibc developers upon using the name
libmalloc.*? To me, this name appears as too general.

3. http://mr.himki.net/index-alloc.html is in a Cyrillan written language
(Russian?). An English version would be helpful, because except of the source
code there doesn't seem to be any other documentation.

4. The source file seems to be intended to be used as a preloaded module:

From the source code:
 * Compilation: gcc -shared -fPIC -O2 OpenBSD_malloc_Linux.c -o malloc.so   
 * Launching: LD_PRELOAD=/path/to/malloc.so firefox

I am not sure if packaging it as a library is a wise decision.
Comment 5 Peter Lemenkov 2007-05-12 12:11:07 EDT
(In reply to comment #4)

> 1. MUSTFIX:
> 
> This spec doesn't apply $RPM_BUILD_ROOT. It compiles and places its files
> directly into */BUILD.
> 
> One way to approach this:
> %setup -c -T

Done.
> 
> 2. Is there an agreement with the glibc developers upon using the name
> libmalloc.*? To me, this name appears as too general.

Renamed.
 
> 3. http://mr.himki.net/index-alloc.html109 is in a Cyrillan written language
> (Russian?). An English version would be helpful, because except of the source
> code there doesn't seem to be any other documentation.

OK, I'll try to add something more valuable docs.

> 4. The source file seems to be intended to be used as a preloaded module:
> I am not sure if packaging it as a library is a wise decision.

Hmmm. Are any recomendations about handling of preloaded libraries?

http://lemenkov.googlepages.com/openbsd-malloc.spec
http://lemenkov.googlepages.com/openbsd-malloc-0-4.src.rpm

Comment 6 Jason Tibbitts 2008-01-27 19:57:46 EST
Note that this built for me in mock on rawhide but did not install:

mock: /usr/bin/yum --installroot /mock/fedora-development-x86_64/root/  install
/mock/fedora-development-x86_64/result/openbsd-malloc-0-4.fc9.x86_64.rpm
/mock/fedora-development-x86_64/result/openbsd-malloc-debuginfo-0-4.fc9.x86_64.rpm
Error: Missing Dependency: ld-linux-x86-64.so.2(GLIBC_PRIVATE)(64bit) is needed
by package openbsd-malloc
Comment 7 Peter Lemenkov 2008-06-22 00:32:49 EDT
I'm no longer interested in packaging this.