Commit Graph

53 Commits

Author SHA1 Message Date
aCaB
8a6c292152 make solaris linker happy 2011-02-08 02:43:44 +01:00
aCaB
d4c6e1d69b regen pool 32bit 2011-01-18 16:48:03 +01:00
aCaB
697b276e09 recompute pool sizes amd64 2011-01-18 15:57:27 +01:00
aCaB
7cbc72d3b1 c4w: error path engine leak 2010-11-09 19:02:53 +02:00
aCaB
4f798ac6e7 expand pua, bump rc version 2010-09-22 12:13:38 +02:00
Tomasz Kojm
80871017e0 libclamav/mpool.c: permanently disable debug mode (bb#2222) 2010-08-26 14:09:15 +02:00
Török Edvin
c973580727 drop 2 more sizes. 2010-06-29 15:25:59 +03:00
Török Edvin
8a88afcfb4 Regenerate sizes. 2010-06-29 15:19:28 +03:00
Török Edvin
5f12eacba7 Fix alignment calculation. 2010-06-29 13:25:11 +03:00
Török Edvin
bab1a60424 Regenerate pool sizes.
On 32-bit we now use only 78MB instead of 91MB, and on 64-bit we use 106MB.
2010-06-29 12:24:23 +03:00
Török Edvin
d068119a9f Reduce memory waste due to alignment (~14% improvement).
Previously we were aligning all sizes to 8, and we had FRAG_OVERHEAD of 8
(because we wanted everything 8 byte aligned).
Now we only align as needed, and also only align a size once significantly
reducing memory waste.
FRAG_OVERHEAD is only 2, with up to 7 bytes of padding in worst case, but
usually much better.
2010-06-29 12:24:23 +03:00
aCaB
4743d54fd9 mpool for win32, update win32 stuff 2010-05-10 03:46:46 +02:00
Török Edvin
e4a0f2c94f fix compiler warnings (bb #1872, bb #1934, bb #1935) 2010-04-13 16:19:47 +03:00
Török Edvin
630d47cb0d Need to align the MPMAP field to 64-bit for Sparc.
Otherwise the returned pointers are not aligned either!
2010-03-22 18:36:03 +02:00
Török Edvin
5684130b55 Fix sparc sigbus. 2010-03-22 14:08:56 +02:00
aCaB
6eaca76eb0 pool size recalculated, win32 VI bumped 2010-03-21 18:35:32 +01:00
Török Edvin
261e29da34 Fix bus error on Sparc.
Now that we have a struct with a 64-bit int member, we need to align
everything to 64-bits on sparc! The FRAG itself was aligned, however
the ->fake member was at 4-bytes distance (so half the time unaligned).
Fix this by adding a dummy 64-bit member in the union to force alignment to at
least 64-bit.

Also fix some compiler warnings from make distcheck.
2010-01-15 10:23:25 +02:00
Tomasz Kojm
12c6a97e9b fix some compiler warnings 2010-01-12 16:16:08 +01:00
aCaB
01a11a380e typo in debug message 2010-01-04 22:51:45 +01:00
aCaB
ebf10d4af3 raise mpool max poolsize to 8M 2009-10-24 15:08:58 +02:00
aCaB
11195c0b1b fix several problems introduced by the win32 commits 2009-09-25 00:32:34 +02:00
aCaB
4cd80898e6 win32#3 2009-09-24 19:31:30 +02:00
aCaB
34e79a80a8 mpool: regen sizes, small cleanup 2009-09-23 03:17:10 +02:00
aCaB
86d59b249e fix portability issues for fseeko, sysconf(_SC_PAGESIZE), getpagesize() (bb#1658) 2009-07-16 14:21:25 +02:00
Török Edvin
8b2b7201e1 update mpool frag sizes.
git-svn: trunk@5046
2009-04-17 13:45:18 +00:00
Török Edvin
46826baf4f fix mpool_realloc to work with shrinked sizes. This is not yet used anywhere.
git-svn: trunk@5045
2009-04-17 13:45:12 +00:00
Török Edvin
025243f6e1 fix uninitialized value warning.
git-svn: trunk@4921
2009-03-10 14:14:36 +00:00
Török Edvin
1f48ace849 fix distcheck
git-svn: trunk@4917
2009-03-09 11:40:36 +00:00
Török Edvin
eaf2aebdeb avoid unneeded calloc + memcpy.
git-svn: trunk@4911
2009-03-09 11:22:57 +00:00
aCaB
af449e4756 mpool poisonage complete
git-svn: trunk@4900
2009-03-05 15:45:25 +00:00
aCaB
1b802d3c34 adding mpool poisoning, more to come...
git-svn: trunk@4899
2009-03-05 15:39:37 +00:00
Tomasz Kojm
47d40feb7a libclamav: use LibTomMath by Tom St Denis instead of libgmp for multiple precision integer arithmetic (bb#1366)
git-svn: trunk@4650
2009-01-26 19:47:02 +00:00
Tomasz Kojm
27e28c610e libclamav/mpool.c: fix old free() call in cli_mp_hex2ui()
git-svn: trunk@4592
2009-01-05 18:39:40 +00:00
aCaB
fd856af471 use char* arithmetic
git-svn: trunk@4433
2008-11-18 18:34:54 +00:00
Török Edvin
db43492c79 remove nonexistent symbols from .map file, add dummy functions.
git-svn: trunk@4431
2008-11-18 13:07:10 +00:00
aCaB
160930d433 test completed, --enable-mempool works again - sorry for the trouble
git-svn: trunk@4415
2008-11-14 21:13:49 +00:00
aCaB
bf6f78a4dc this is a test, --enable-mempool deliberately broken
git-svn: trunk@4414
2008-11-14 21:07:50 +00:00
aCaB
b26d0ef3fd mpool opt
git-svn: trunk@4354
2008-11-08 05:34:25 +00:00
Török Edvin
b9b477842d fix compiler warnings, more to come (bb #273)
git-svn: trunk@4346
2008-11-06 14:27:43 +00:00
Török Edvin
deb3031222 mempool statistics support
git-svn: trunk@4344
2008-11-06 14:27:27 +00:00
Török Edvin
6a21552ef2 have configure define NDEBUG unless we use --enable-debug, instead of having
to #ifndef CL_DEBUG #define NDEBUG #endif in each .c file that uses assert.
If you want assertions enabled you'll need to use --enable-debug to configure,
as until now, no change there.

git-svn: trunk@4343
2008-11-06 14:27:18 +00:00
Török Edvin
26ffcfa20c use ANONYMOUS_MAP from clamav-config.h instead of MAP_ANONYMOUS, fix mp_flush
call mp_flush from readdb

git-svn: trunk@4340
2008-11-05 10:46:23 +00:00
Török Edvin
c9a3e685b4 * libclamav/mpool.c (mp_destroy): need to use sizeof(*mp) because mp is a pointer here!!
git-svn: trunk@4339
2008-11-05 08:25:01 +00:00
aCaB
38e881e3c0 mpool cli_mp_hex2ui
git-svn: trunk@4337
2008-11-04 21:45:49 +00:00
aCaB
d6e1ef1611 mempool deuglification
git-svn: trunk@4333
2008-11-04 19:18:27 +00:00
Török Edvin
ad0fd7287a * libclamav/matcher-ac.c (cli_ac_addsig): need to use mpool allocated memory for ->str
* libclamav/mpool.c (mp_malloc, cli_mp_hex2str, check_all): introduce hex2str wrapper
	* libclamav/mpool.h (mp_t, cli_mp_hex2str): introduce hex2str wrapper
	* libclamav/regex_list.c (add_hash): need to use mpool allocated memory for arg to bm_addpatt

git-svn: trunk@4330
2008-11-04 10:40:31 +00:00
Török Edvin
7866b37c6b mpool debugging
s/USE_MEMPOOL/USE_MPOOL/

git-svn: trunk@4329
2008-11-04 10:40:24 +00:00
aCaB
946bd26646 merge mempool branch
git-svn: trunk@4320
2008-11-01 02:39:00 +00:00
aCaB
0281fb4d9c 32 and 64 bit pools
git-svn-id: file:///var/lib/svn/clamav-devel/branches/mpool@4301 77e5149b-7576-45b1-b177-96237e5ba77b
2008-10-28 22:45:31 +00:00
aCaB
948644e619 tuned granularity - amd64 only (for now) - VIRT 114 / RES 95
git-svn-id: file:///var/lib/svn/clamav-devel/branches/mpool@4300 77e5149b-7576-45b1-b177-96237e5ba77b
2008-10-28 20:57:54 +00:00