Commit Graph

201 Commits

Author SHA1 Message Date
Jakub Zawadzki 27f92a4c11 Fix ep_check_canary_integrity to use proper variable.
Previously it would sigsegv (accessing (void *) -1), instead of displaying error.


svn path=/trunk/; revision=36745
2011-04-21 05:31:11 +00:00
Jeff Morriss 3161977bf8 Introduce ep_strconcat (copied from the glib version)
svn path=/trunk/; revision=36344
2011-03-26 02:39:04 +00:00
Jeff Morriss b838995e60 Remove some duplicated string manipulation code.
svn path=/trunk/; revision=36343
2011-03-26 02:11:42 +00:00
Jeff Morriss 06aaf02fba Clean up comments: canaries are also used to pad allocations to an 8-byte boundary.
svn path=/trunk/; revision=36071
2011-02-25 15:49:28 +00:00
Jeff Morriss 16f704d831 Add a comment explaining what the canary between allocations looks like.
svn path=/trunk/; revision=36065
2011-02-25 03:18:02 +00:00
Gerald Combs a6bbdaa849 Fix some dead code and zero division issues found by Clang scan-build.
In convert_string_case() use g_utf8_strup() instead of converting each
character by hand. Hopefully this won't cause any unexpected changes in
behavior.

svn path=/trunk/; revision=36006
2011-02-18 22:43:48 +00:00
Stephen Fisher 9c28650e67 Fix bug #5463 (and likely others) so that ep_strbuf_new() no longer
truncates newly created and copied strings.  The problem was that
strlen() (which returns a length not counting the NULL terminator) was
being mixed with functions that do malloc() (which need to allocate
memory large enough to inculde the NULL string terminator).


svn path=/trunk/; revision=35128
2010-12-06 17:30:08 +00:00
Jeff Morriss 7d20440ff0 Introduce 2 new environment variables: WIRESHARK_EP_VERIFY_POINTERS and
WIRESHARK_SE_VERIFY_POINTERS that control whether or not we verify if a given
pointer is ep_ or se_ allocated, respectively.

Turn the behavior off by default for speed reasons (the speed difference isn't
huge, but...).

Turn the behavior on when fuzz testing.

Document these two new variables in the man pages.

svn path=/trunk/; revision=34046
2010-09-02 18:02:06 +00:00
Guy Harris 60d5efc2a3 In C, foo() isn't a function with no arguments, foo(void) is.
svn path=/trunk/; revision=32422
2010-04-08 02:26:56 +00:00
Stig Bjørlykke f57d6e2095 From Alex Lindberg via bug 4463:
Added se_tree_lookup32_array_le to emem.[ch].  This function is similar to
se_tree_lookup32_le already defined.

Updated README.binarytrees to reflect this added function and corrected minor
spelling issues.

svn path=/trunk/; revision=31812
2010-02-07 11:01:13 +00:00
Anders Broman 8c07e34123 Reversion of SVN 30488 as suggested in https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=4450.
"g_strlcpy() assumes that src *IS* ASCII NUL terminated.  If the src buffer is
not NUL terminated, g_strlcpy() *WILL* read past the end of the buffer."

svn path=/trunk/; revision=31782
2010-02-04 06:42:04 +00:00
Bill Meier 9d663d7081 Fix various gcc -Wshadow warnings.
svn path=/trunk/; revision=31720
2010-01-28 18:45:46 +00:00
Anders Broman db64e65ec2 From Jakub Zawadzki:
mmap() actually when fail returns MAP_FAILED (-1) not NULL
Part of Bug:
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=4140

svn path=/trunk/; revision=31593
2010-01-20 20:26:01 +00:00
Anders Broman 27bc3e2211 From Jakub Zawadzki:
Fix some bugs after merge.
Part of Bug:
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=4140

svn path=/trunk/; revision=31586
2010-01-20 06:37:56 +00:00
Ronnie Sahlberg f817636cc6 remove an unusued variable
svn path=/trunk/; revision=31582
2010-01-20 03:55:03 +00:00
Anders Broman 2183430a29 From Jakub Zawadzki:
Embed canary list inside chunk data.
Part of Bug:
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=4140

svn path=/trunk/; revision=31577
2010-01-19 21:28:48 +00:00
Anders Broman 46501fd7f6 From Jakub Zawadzki:
Make emem_create_chunk() a function.
Part of Bug:
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=4140

svn path=/trunk/; revision=31576
2010-01-19 20:54:27 +00:00
Anders Broman 8e276fa139 From Jakub Zawadzki:
Cleanup emem_create_chunk() - move common code outside #ifdef's
Part of Bug:
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=4140

svn path=/trunk/; revision=31575
2010-01-19 20:53:02 +00:00
Gerald Combs 9417a7c86f From Jakub Zawadzki via bug 4274:
Switch back to checking size instead of asize in emem_alloc_chunk. Make
sure we don't try to cross the streams by allocating a negative amount
of memory in the LTP dissector.

svn path=/trunk/; revision=31132
2009-11-30 17:31:13 +00:00
Stig Bjørlykke d577ca0fa7 Guard #include <sys/types.h> with HAVE_SYS_TYPES_H.
svn path=/trunk/; revision=31053
2009-11-23 18:47:52 +00:00
Gerald Combs 483711e3f5 Add a comment about using memcpy for scrubbing.
svn path=/trunk/; revision=30680
2009-10-23 21:07:28 +00:00
Jeff Morriss 78318b32ee Add emem_init() which initializes both the ep_ and se_ allocators; have all
callers use that instead of initializing each allocator individually.

svn path=/trunk/; revision=30646
2009-10-20 17:43:05 +00:00
Jeff Morriss 38cb8e82c3 Don't call xx_init_chunk() in ep_free_all() and se_free_all() if we're not
using chunks.  With this change, xx_init_chunk() are only called once at
startup (as their comments imply).

Instead, set free_list to NULL in emem_free_all() (if we're not using chunks).

svn path=/trunk/; revision=30644
2009-10-20 17:16:40 +00:00
Jeff Morriss ab13546f71 From Jakub Zawadzki via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=4140 :
There is emem_header_t struct, so IMHO is better to use struct instead of
global variables.

Split emem_alloc() into two functions: emem_alloc_chunk and emem_alloc_glib.
Current allocator is available in emem_header_t.memory_alloc

It should be easier to develop new memory allocator and maintain current.
It might also give some speedup (we don't need to check mem->debug_use_chunks
every time :)

From me:

Initialize emem_header_t.trees.  Some indentation cleanup.

svn path=/trunk/; revision=30624
2009-10-19 22:31:08 +00:00
Jeff Morriss c293e4d024 Introduce an optional (ep_ and se_) memory scrubber. When activated (export
WIRESHARK_DEBUG_SCRUB_MEMORY to turn it on) this function initializes all
allocated memory to 0xBADDCAFE and all freed memory to 0xDEADBEEF.  (Of course
the allocation functions like ep_alloc0() re-initialize the allocated memory
back to 0.)

svn path=/trunk/; revision=30579
2009-10-16 21:36:42 +00:00
Kovarththanan Rajaratnam cc6d443867 Use G_MEM_ALIGN when we have to determine the amount of padding needed instead of hard coding it to 8 bytes alignment.
Before:

Allocation distribution (sizes include canaries):
size <    32:   454120
size <    64:   401506

After:

Allocation distribution (sizes include canaries):
size <    32:   457281
size <    64:   398345

svn path=/trunk/; revision=30496
2009-10-11 08:20:40 +00:00
Kovarththanan Rajaratnam 5ea31fa450 Rename emem_canary => emem_canary_init to make it clear that the function initializes the canary
svn path=/trunk/; revision=30493
2009-10-11 07:15:15 +00:00
Kovarththanan Rajaratnam 876f39f5a3 Only check to see if 'free_list' is empty when we've just moved over a chunk to the 'used_list'
svn path=/trunk/; revision=30492
2009-10-11 07:07:05 +00:00
Kovarththanan Rajaratnam 4255bd2e53 Tighten scope of some variables in emem_alloc()
svn path=/trunk/; revision=30491
2009-10-11 06:34:02 +00:00
Kovarththanan Rajaratnam 932f307117 Change EMEM_PACKET_CHUNK_SIZE to (10 * 1024 * 1024) to make it easier to see that we allocate in 10 MB chunks.
svn path=/trunk/; revision=30490
2009-10-11 06:26:24 +00:00
Kovarththanan Rajaratnam c394047159 Use g_strlcpy instead of providing our own string copy implementation
svn path=/trunk/; revision=30488
2009-10-11 06:04:58 +00:00
Kovarththanan Rajaratnam b5ce884cf4 Use memcpy when we already know the length of the string
svn path=/trunk/; revision=30487
2009-10-11 05:53:10 +00:00
Jeff Morriss 325ce121d8 Print statistics to stderr so we can see (only) them when using tshark.
svn path=/trunk/; revision=30452
2009-10-09 21:27:46 +00:00
Jeff Morriss 3cf628c417 Unify the stats output regardless of whether we're using canaries or not. Fix some math/calculation issues (including taking the guard pages into account when calculating waste). Since we've already counted the SE allocations for the distribution display, use that (instead of the canaries) to count how many allocations we've had.
svn path=/trunk/; revision=30449
2009-10-09 21:00:00 +00:00
Kovarththanan Rajaratnam a8ca8d1815 Call emem_canary() immediately
svn path=/trunk/; revision=30403
2009-10-08 14:48:43 +00:00
Kovarththanan Rajaratnam 03f934d183 From Harald Welte via bug 4106:
Fix 'cast from pointer to integer of different size'

svn path=/trunk/; revision=30402
2009-10-08 14:40:23 +00:00
Kovarththanan Rajaratnam ef48a237ed Remove debug g_warning()
svn path=/trunk/; revision=30399
2009-10-08 13:24:03 +00:00
Anders Broman 2e3bc6bcc2 Dont use canaries for SE allocated memory as a default the owerhead
is to big when allocating lot's of memory. EP memory does not suffer as much as we seems to only allocate one chunk for EP memory.

svn path=/trunk/; revision=30397
2009-10-08 11:46:15 +00:00
Jeff Morriss 6a7c00894d Add some SE allocation statistics (if SHOW_MEM_STATS is defined).
Add print_alloc_stats() will show some (hopefully useful) statistics about the
memory we have allocated, the average allocation size, the amount of
overhead/waste, etc.

svn path=/trunk/; revision=30371
2009-10-06 16:20:26 +00:00
Anders Broman 570208780b Increase EMEM_ALLOCS_PER_CHUNK to avoid memory waist.
svn path=/trunk/; revision=30356
2009-10-06 10:10:33 +00:00
Kovarththanan Rajaratnam 978bd4982d Use g_free() (should have been part of r30342)
svn path=/trunk/; revision=30347
2009-10-05 19:18:09 +00:00
Kovarththanan Rajaratnam e567d96a93 Use g_malloc()
svn path=/trunk/; revision=30342
2009-10-05 18:20:38 +00:00
Stig Bjørlykke e362a37cbc Ensure we don't dereference a null pointer.
Made emem_canary() static.

svn path=/trunk/; revision=30186
2009-09-29 06:50:35 +00:00
Kovarththanan Rajaratnam 7ba4fb4ba8 Make sure that we also traverse the free_list while looking for valid pointers
svn path=/trunk/; revision=30113
2009-09-24 13:37:02 +00:00
Kovarththanan Rajaratnam 8f0d93fb12 Add unsigned int type cast
svn path=/trunk/; revision=30037
2009-09-21 14:01:30 +00:00
Kovarththanan Rajaratnam 859bd0f8b2 Make sure that we track the amount allocated when we're doling out memory from the system pool. The verify pointer stuff should should now work with WIRESHARK_DEBUG_EP_NO_CHUNKS=1 and WIRESHARK_DEBUG_SE_NO_CHUNKS=1
svn path=/trunk/; revision=30032
2009-09-21 10:44:59 +00:00
Kovarththanan Rajaratnam 1a61b42e8a Add ep_verify_pointer()/se_verify_pointer() which checks whether the given pointer belongs in the seasonal/ephemeral pool.
svn path=/trunk/; revision=30011
2009-09-20 12:02:40 +00:00
Kovarththanan Rajaratnam 2d37d1816d Remove unused/dead code
svn path=/trunk/; revision=30009
2009-09-20 09:32:52 +00:00
Kovarththanan Rajaratnam 42b01b61ab Make se_trees static in emem.c
svn path=/trunk/; revision=30008
2009-09-20 09:28:55 +00:00
Kovarththanan Rajaratnam e6f7a87937 Use g_new()
svn path=/trunk/; revision=30005
2009-09-20 09:03:02 +00:00
Kovarththanan Rajaratnam b91827f5a0 Avoid calling emem_create_chunk() needlessly
svn path=/trunk/; revision=29734
2009-09-06 08:10:12 +00:00
Jörg Mayer a3c38e1057 Include "proto.h" instead of <proto.h>
svn path=/trunk/; revision=29694
2009-09-04 11:48:04 +00:00
Kovarththanan Rajaratnam e0e33ca74b We now expose the following environment variables:
* WIRESHARK_DEBUG_EP_NO_CHUNKS
 * WIRESHARK_DEBUG_SE_NO_CHUNKS
 * WIRESHARK_DEBUG_EP_NO_CANARY
 * WIRESHARK_DEBUG_SE_NO_CANARY

This allows us to enable/disable memory chunks and canaries at runtime _without_ needing to recompile.

svn path=/trunk/; revision=29375
2009-08-11 09:24:56 +00:00
Kovarththanan Rajaratnam 7702b8766d Use ! defined(EP_DEBUG_FREE) && ! defined(SE_DEBUG_FREE) to guard canary code to get things compiling after r29358.
svn path=/trunk/; revision=29365
2009-08-10 16:36:44 +00:00
Kovarththanan Rajaratnam 3f4f8b0b94 Add unsigned int typecast
svn path=/trunk/; revision=29361
2009-08-09 21:10:04 +00:00
Kovarththanan Rajaratnam 39b1eb1015 g_error() requires a string literal.
svn path=/trunk/; revision=29360
2009-08-09 20:28:38 +00:00
Kovarththanan Rajaratnam 50c9dbca26 Split common parts of ep_free_all and se_free_all into emem_free_all.
svn path=/trunk/; revision=29359
2009-08-09 20:10:19 +00:00
Kovarththanan Rajaratnam ecb5ee8e91 Split common parts of se_alloc and ep_alloc into emem_alloc.
svn path=/trunk/; revision=29358
2009-08-09 19:23:13 +00:00
Bill Meier fdda6e8778 ep_strbuf: fix some bugs and additional changes
-Bugs
  * str->len not set correctly in some cases;
  * trailing '\0' not always accounted for;
  * (issues relating to determining when & how much 
     to expand string buffer).
-Other
  * Change append, append_c, truncate to return 
    pointer to ep_strbuf (similar to the corresponding
    GString functions);
  * Rename certain variables to clarify usage (as I understand
    the intended usage);
  * ep_strbuf_grow: use current allocated length and not current
    string length as the starting point;
  * Optimizations;
  * Add some additional comments to emem.h ep_strbuf section

  * Use consistent indentation throughout emem.c;

svn path=/trunk/; revision=28044
2009-04-14 14:08:19 +00:00
Jörg Mayer 69cc30c611 Another patch to sqelch warnings about asserts in g_strlcpy with NULL source pointer
svn path=/trunk/; revision=27985
2009-04-07 16:43:15 +00:00
Gerald Combs 6348c17c16 size_t fixes.
svn path=/trunk/; revision=27984
2009-04-07 16:36:52 +00:00
Jörg Mayer 409e59c32a Don't crash on linux:
strlen(NULL) isn't an acceptable call.

svn path=/trunk/; revision=27948
2009-04-03 17:32:32 +00:00
Gerald Combs 36f614cc1a Call ep_strbuf_append_printf() from ep_strbuf_append().
svn path=/trunk/; revision=27899
2009-03-30 19:38:47 +00:00
Gerald Combs 6c6c89e835 Add a missing check.
svn path=/trunk/; revision=27875
2009-03-28 05:14:16 +00:00
Gerald Combs 21e87a963f Replace a lot of pointer tracking and some GStrings with emem_strbufs. Add
ep_strbuf_printf and ep_strbuf_append_c.

svn path=/trunk/; revision=27873
2009-03-28 00:27:03 +00:00
Gerald Combs 446d43351c Add initial support for string buffers - ep_allocated, growable strings
similar to GLib's GStrings. Use them to create the list of TCP flags.

svn path=/trunk/; revision=27872
2009-03-27 23:05:37 +00:00
Luis Ontanon 230d917776 Add a debug helper for EP memory corruption
if compiled in and the env var WIRESHARK_DEBUG_EP_CANARY is set:
will check for canary integrity at every call to EP_CHECK_CANARY()
if corruption is found it exits pronting the prior location and the location in which corruption was found.
Hopefully it stops running while the corruptor is still in the stack.

see EP_CHECK_CANARY() calls in packet.c as an example.




svn path=/trunk/; revision=25927
2008-08-05 02:23:35 +00:00
Guy Harris 9e6329860a Fix some warnings - declare some arguments, variables, and structure
members to be const pointers when that's possible, and throw in some
casts when the GLib API fails to have properly consted arguments.

Use ep_strdup_printf() in some cases.

svn path=/trunk/; revision=25596
2008-06-25 03:05:19 +00:00
Anders Broman 36d89bb79c Fix some of the Errors/warnings detected by checkapi.
svn path=/trunk/; revision=25368
2008-05-23 05:55:34 +00:00
Jeff Morriss a5cee04fad Move the file utility functions from wiretap to libwsutil so that
libwireshark (and the plugins using those functions) do not depend on
wiretap on Windows.

While doing that, rename the eth_* functions to ws_*.

svn path=/trunk/; revision=25354
2008-05-22 15:46:27 +00:00
Stig Bjørlykke 1f3f4d39da From Marton Nemeth (bug 2484):
The variables ep_canary[], se_canary[], ep_packet_mem and se_packet_mem are
only used in emem.c, so the visibility can be file local (static).

svn path=/trunk/; revision=25132
2008-04-21 08:58:50 +00:00
Stephen Fisher 726a1caaf1 - Remove GLIB1 code
- Change ugly GLIB version checking statements to GLIB_CHECK_VERSION
- Remove ws_strsplit files because we no longer need to borrow GLIB2's
  g_strsplit code for the no longer supported GLIB1 builds


svn path=/trunk/; revision=24829
2008-04-07 05:22:54 +00:00
Jaap Keuter e1f488293a From Sami Farin:
Reads EMEM_CANARY_DATA_SIZE (15) bytes, compares return value to EMEM_CANARY_SIZE (8).
Also, I also added setbuf call in patch so it reads 15 bytes instead of 4096 or 8192.

svn path=/trunk/; revision=24596
2008-03-10 07:53:46 +00:00
Bill Meier 980b393d0d A few more pedantic fixes ...
svn path=/trunk/; revision=24302
2008-02-11 18:43:15 +00:00
Stig Bjørlykke e14c703106 From Jim Young (bug 2162):
Patch for epan/emem.c functions ep_strndup() and se_strndup() to stop valgrind
message "invalid read of size 1".

svn path=/trunk/; revision=24023
2008-01-07 20:44:32 +00:00
Ronnie Sahlberg b153578afa rework how emem trees indexed by strings so that traversing the tree
will traverse the entries in the lexical order of the key.

add a flag to lookup/insert for strings to specify whether a case 
insensitive key should be used instead of a (default) case sensitive 
key.


svn path=/trunk/; revision=23736
2007-12-04 03:26:50 +00:00
Ronnie Sahlberg c20bb13d67 for nested trees, teach emem about which nodes contain a pointer to a
subtree and which nodes that contain a pointer to user data

teach emem to be able to traverse nested trees


svn path=/trunk/; revision=23733
2007-12-04 01:44:05 +00:00
Ronnie Sahlberg 60c561e2bd add tree traversal functions
svn path=/trunk/; revision=23725
2007-12-03 22:47:23 +00:00
Bill Meier 48bb4deed1 (Somewhat academic): Fix fread related bug (when using GTK1).
svn path=/trunk/; revision=23650
2007-11-28 19:53:36 +00:00
Luis Ontanon dfbac00752 SNMP:
- As noted by Thomas Anders values are not added to the tree anymore. Move the calling of subdissectors to the end of the function, so that the value is added to the tree.
 - add port 8161 to be decoded as SNMP (hey, it's on IANA's services file!)
UAT:
 - do not have the uat reloaded.
OIDS:
 - do not complain if renaming an OID to an identical name



svn path=/trunk/; revision=22704
2007-08-28 15:18:32 +00:00
Guy Harris d2ac4f7133 Check for G_GINT64_MODIFIER in Wireshark as we do in Wiretap.
In all the places where a cast to "long long" or "unsigned long long"
was done, use G_GINT64_MODIFIER and get rid of the cast, as

	1) there's no guarantee that "%ll" works

and

	2) there's no guarantee that "long long" works

(the latter definitely does *NOT* work with MSVC++; the former doesn't
work with regular printf in MSVC++, but it might work with the GLib
printf-based functions).

svn path=/trunk/; revision=21978
2007-05-29 06:56:07 +00:00
Sebastien Tandel 76729e5d0f From David Howells :
Fix compilation failures when building wireshark-0.99.6-SVN-21916 on an
x86_64-unknown-linux-gnu target with gcc version 4.1.2 20070403 (Red Hat
4.1.2-8).

The failures fall into two categories:
  (1) Casts between pointers and 32-bit integers without an intermediary cast
via 'long' or 'unsigned long'.  This results in a compiler warning complaining
about casts between a pointer and an integer of a different size.
  (2) Passing values to "%lld" or similar printf-style format options that the
compiler thinks are a different size.  Such values need to be cast to 'long
long' or 'unsigned long long'.

svn path=/trunk/; revision=21975
2007-05-29 02:43:18 +00:00
Guy Harris 706a028996 In emem_tree_lookup_string(), return NULL if the allocation fails.
svn path=/trunk/; revision=21612
2007-04-28 21:58:42 +00:00
Guy Harris b98d651b21 In calls to the emem_tree routines, forcibly align items not known to be
aligned on 32-bit boundaries.

svn path=/trunk/; revision=21611
2007-04-28 21:09:20 +00:00
Guy Harris 1bc049906a Add some GCC warnings to the standard set, and add some others to the
--enable-extra-gcc-checks set.

If we turn on -pedantic, try turning on -Wno-long-long as well, so that
it's not *so* pedantic that it rejects the 64-bit integral data types
that we explicitly require.

Constify a bunch of stuff, and make some other changes, to get rid of
warnings.

Clean up some indentation.

svn path=/trunk/; revision=21526
2007-04-23 10:59:26 +00:00
Graham Bloice 7710d21893 Fix build failures due to windows.h being included before winsock2.h via other includes
svn path=/trunk/; revision=21335
2007-04-04 12:18:10 +00:00
Gerald Combs e97d1f0866 Squelch Coverity CIDs 225, 226, and 227.
svn path=/trunk/; revision=20552
2007-01-25 06:51:30 +00:00
Ulf Lamping e3330fd922 instead of simply doing an assert when running out of memory in emem, throw a new OutOfMemoryError Exception, so file.c can show at least a better explanation to the user before Wireshark terminates
XXX - to prevent a busy wait, I need a portable way to wait for a short time period, like Sleep() for Windows

svn path=/trunk/; revision=20437
2007-01-15 05:16:13 +00:00
Ulf Lamping c4840e61aa fix a warning
svn path=/trunk/; revision=19907
2006-11-15 23:48:56 +00:00
Ronnie Sahlberg 14810dd30c fix so that tcp.pdu.time works again.
it broken in one of the previous bugfixes to tcp

add a function to print an emem tree to the console for easier emem tree debugging


svn path=/trunk/; revision=19877
2006-11-11 22:39:25 +00:00
Ronnie Sahlberg 2fdf0e4b4b add trees with PErmanent allocation scope which will be useful for constructing
associative arrays for globally unique and persistent mappings such as
oid to name
sid to name
guid to name


svn path=/trunk/; revision=18937
2006-08-17 08:17:48 +00:00
Ronnie Sahlberg 2657b9b701 make creation of subtrees used for the _array tree type use the same allocation scope as its parent and thus become allocation scope agnostic
change all accessor functions to be defines to the emem_tree_ functions.



now   to create a tree with a different scope we only need to create a new
..._tree_create() function   and set up the appropriate defines


(it was a mistake to call the functions   se_tree_create   and se_tree_create_non_persistent,     they should be the other way around    i.e.  se_tree_create_persistent   and se_tree_create )



svn path=/trunk/; revision=18895
2006-08-14 09:36:15 +00:00
Ronnie Sahlberg 8ce8e719e0 rename some structures and defines from the se_tree to the emem_tree prefix
svn path=/trunk/; revision=18894
2006-08-14 08:29:29 +00:00
Ronnie Sahlberg 8529abb69b put a memory allocator function pointer inside the tree structure so that all accessor functions become storage scope agnostic
svn path=/trunk/; revision=18888
2006-08-12 23:27:22 +00:00
Ronnie Sahlberg db2e890949 rename some inline functions from se_ to emem_ prefix as a first step to generalize
teh tree management and to use trees with different storage scope without too much code duplication.


it would be useful with a tree that had indefinite storage instead of the emem functions which commonly have ep or se storage scope.

indefinite storage scope would be useful for example for managing a global and static set of well known guid to name mappings(not yet implemented)    and also for
oid to name mappings.

 

svn path=/trunk/; revision=18886
2006-08-12 22:43:12 +00:00
Anders Broman c72d4e8f2e From Albert Chin:
Fix some C++ comments in C source files and fixes some non-constant initializations.

svn path=/trunk/; revision=18521
2006-06-20 05:57:29 +00:00
Guy Harris 535a8bd006 Not all UN*Xes have MAP_ANONYMOUS; some have MAP_ANON instead, and some
have neither.  For those with MAP_ANON but not MAP_ANONYMOUS, use
MAP_ANON; for those with neither, add some code to use "/dev/zero".

svn path=/trunk/; revision=18488
2006-06-17 02:31:56 +00:00
Jaap Keuter 2288c8590d From Albert Chin
HP-UX doesn't have MAP_ANON but it does have MAP_ANONYMOUS. Moreoever,
according to mmap(2) on RHEL:
       MAP_ANONYMOUS
              The mapping is not backed by any file; the fd and offset argu-
              ments are ignored.  This flag in conjunction with MAP_SHARED is
              implemented since Linux 2.4.

       MAP_ANON
              Alias for MAP_ANONYMOUS. Deprecated.


svn path=/trunk/; revision=18486
2006-06-16 21:30:58 +00:00
Gerald Combs 8958bab6de Tethereal/tethereal -> TShark/tshark.
svn path=/trunk/; revision=18268
2006-05-31 17:38:42 +00:00
Anders Broman 996d4db495 Ethereal->Wireshark
svn path=/trunk/; revision=18234
2006-05-28 19:49:07 +00:00