1 | The Hoard Memory Allocator |
---|
2 | Copyright (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 | |
---|
8 | Building Hoard (Unix) |
---|
9 | --------------------- |
---|
10 | |
---|
11 | To build Hoard on non-Windows platforms, change into the src/ |
---|
12 | directory and run "make" followed by the appropriate target. If you |
---|
13 | type "make", it will present a list of available targets. These |
---|
14 | include linux-gcc-x86, solaris-sunw-sparc, etc. |
---|
15 | |
---|
16 | You can then use Hoard by linking it with your executable, or |
---|
17 | by setting the LD_PRELOAD environment variable, as in |
---|
18 | |
---|
19 | % export LD_PRELOAD=/path/to/libhoard.so |
---|
20 | |
---|
21 | in 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 | |
---|
29 | or, in Mac OS X: |
---|
30 | |
---|
31 | % export DYLD_FORCE_FLAT_NAMESPACE=YES |
---|
32 | % export DYLD_INSERT_LIBRARIES=/path/to/libhoard.dylib |
---|
33 | |
---|
34 | Building Hoard (Windows) |
---|
35 | ------------------------ |
---|
36 | |
---|
37 | There are two options for using Hoard with Windows, in decreasing |
---|
38 | order 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 | |
---|