source: proiecte/swift/trunk/lib/hoard-371/README @ 176

Last change on this file since 176 was 176, checked in by (none), 14 years ago
  • imported repo from "guagal"
File size: 1.8 KB
Line 
1The Hoard Memory Allocator
2Copyright (C) 1999-2007 by Emery Berger
3
4 <http://www.hoard.org>
5 <http://www.cs.umass.edu/~emery>
6 <mailto:emery@cs.umass.edu>
7
8Building Hoard (Unix)
9---------------------
10
11To build Hoard on non-Windows platforms, change into the src/
12directory and run "make" followed by the appropriate target. If you
13type "make", it will present a list of available targets. These
14include linux-gcc-x86, solaris-sunw-sparc, etc.
15
16You can then use Hoard by linking it with your executable, or
17by setting the LD_PRELOAD environment variable, as in
18
19  % export LD_PRELOAD=/path/to/libhoard.so
20
21in Solaris:
22
23  % export LD_PRELOAD="/path/to/libhoard_32.so:/usr/lib/libCrun.so.1"
24  (32-bit version)
25
26  % export LD_PRELOAD="/path/to/libhoard_64.so:/usr/lib/64/libCrun.so.1"
27  (64-bit version)
28
29or, in Mac OS X:
30
31  % export DYLD_FORCE_FLAT_NAMESPACE=YES
32  % export DYLD_INSERT_LIBRARIES=/path/to/libhoard.dylib
33
34Building Hoard (Windows)
35------------------------
36
37There are two options for using Hoard with Windows, in decreasing
38order of preference:
39
40(1) Use winhoard.dll
41    (when you have all object files)
42
43  - Go to the src/ directory.
44  - Run 'compile-winhoard.cmd'.
45  - Link your executable with 'usewinhoard.cpp' and 'winhoard.lib'.
46    You *must* use the /MD flag.
47
48(2) Use libhoard.dll
49    (when you have all sources)
50
51  - Go to the src/ directory.
52  - Run 'compile-dll.cmd'.
53  - Add 'libhoard.lib' to your project.
54
55  - You may need to add the link command: "/FORCE:MULTIPLE". This
56    option forces a link even when multiply defined symbols exist.
57
58  - Make sure that you dynamically link the executable (i.e., don't
59    generate a Multithreaded version, but rather Multithreaded DLL),
60    as in /MD. This linkage will ensure that you completely
61    replace every memory allocation call.
62
Note: See TracBrowser for help on using the repository browser.