Sophie

Sophie

distrib > Mandriva > 2010.0 > i586 > by-pkgid > 56882686c7ad11f4bd595dacb1f22fe7 > files > 3

hoard-3.7.1-1mdv2009.1.i586.rpm

The Hoard Memory Allocator
Copyright (C) 1999-2007 by Emery Berger

 <http://www.hoard.org>
 <http://www.cs.umass.edu/~emery>
 <mailto:emery@cs.umass.edu>

Building Hoard (Unix)
---------------------

To build Hoard on non-Windows platforms, change into the src/
directory and run "make" followed by the appropriate target. If you
type "make", it will present a list of available targets. These
include linux-gcc-x86, solaris-sunw-sparc, etc.

You can then use Hoard by linking it with your executable, or
by setting the LD_PRELOAD environment variable, as in

  % export LD_PRELOAD=/path/to/libhoard.so

in Solaris:

  % export LD_PRELOAD="/path/to/libhoard_32.so:/usr/lib/libCrun.so.1"
  (32-bit version)

  % export LD_PRELOAD="/path/to/libhoard_64.so:/usr/lib/64/libCrun.so.1"
  (64-bit version)

or, in Mac OS X:

  % export DYLD_FORCE_FLAT_NAMESPACE=YES
  % export DYLD_INSERT_LIBRARIES=/path/to/libhoard.dylib

Building Hoard (Windows)
------------------------

There are two options for using Hoard with Windows, in decreasing
order of preference:

(1) Use winhoard.dll
    (when you have all object files)

  - Go to the src/ directory.
  - Run 'compile-winhoard.cmd'.
  - Link your executable with 'usewinhoard.cpp' and 'winhoard.lib'.
    You *must* use the /MD flag.

(2) Use libhoard.dll
    (when you have all sources)

  - Go to the src/ directory.
  - Run 'compile-dll.cmd'.
  - Add 'libhoard.lib' to your project.

  - You may need to add the link command: "/FORCE:MULTIPLE". This
    option forces a link even when multiply defined symbols exist.

  - Make sure that you dynamically link the executable (i.e., don't
    generate a Multithreaded version, but rather Multithreaded DLL),
    as in /MD. This linkage will ensure that you completely
    replace every memory allocation call.