Commit Graph

16 Commits

Author SHA1 Message Date
5269a7d1e2 Prune free'd nodes from our free list otherwise we'll end up re-using
2002-01-04  Jeffrey Stedfast  <fejj@ximian.com>

	* e-memory.c (e_memchunk_clean): Prune free'd nodes from our free
	list otherwise we'll end up re-using free'd memory blocks and
	that's not a Good Thing (tm).

svn path=/trunk/; revision=15250
2002-01-05 00:03:05 +00:00
08fb7329cb Fixing the license text.
svn path=/trunk/; revision=14212
2001-10-27 16:59:46 +00:00
02dcd0aadf Update the licensing information to require version 2 of the GPL
(instead of version 2 or any later version).

svn path=/trunk/; revision=14190
2001-10-27 00:25:49 +00:00
6a61d6a7e5 Added some malloc check stuff.
2001-07-05  Not Zed  <NotZed@Ximian.com>

        * e-memory.c: Added some malloc check stuff.

svn path=/trunk/; revision=10899
2001-07-09 01:48:19 +00:00
91cc026904 Update the copyrights, replacing Helix Code with Ximian and
helixcode.com with ximian.com all over the place.

svn path=/trunk/; revision=10440
2001-06-23 08:52:02 +00:00
36cac270be Modified to match e_strv_get behaviour. Assert on bad cases, and return ""
2001-04-26  Not Zed  <NotZed@Ximian.com>

        * e-memory.c (e_poolv_get): Modified to match e_strv_get
        behaviour.  Assert on bad cases, and return "" rather than NULL
        for empty/unset strings.
        (e_poolv_new): Simplify the mutex cases, only have a single mutex
        for mempool and hashtable references.
        (e_poolv_set): Simplify mutex code.  Fixed a #ifdef orde prob in
        profile stuff.  Always copy string to our own memory when we add
        it to the hash, even if we free it; I think this would have led to
        dangling references otherwise.
        (e_poolv_destroy): Renamed from poolv_free, for consistency with
        the rest of the allocators here.
        (e_poolv_set): Add optional refcounting code here, not currently
        enabled/used, but should make proper string collection work
        easily.
        (e_poolv_destroy): Unrefcount the strings here.
        (e_poolv_cpy): Add refcounting code here.

        * e-memory.[ch]: Applied Jacob's patches <jacob@ximian.com> for
        'e-poolv' type, added his name to the authors list.

svn path=/trunk/; revision=9570
2001-04-26 01:07:44 +00:00
4c2f2ea4a7 Added #include <glib.h> and move corresponding local headers to the top to
2001-04-24  Kjartan Maraas  <kmaraas@gnome.org>

	* e-gui-utils.c, e-memory, e-msgport.c, e-pilot-map, e-sexp.c:
	Added #include <glib.h> and move corresponding local headers
	to the top to catch missing includes in them. Tip from clahey.

svn path=/trunk/; revision=9537
2001-04-24 09:23:12 +00:00
6d9167de80 Remove #include <glib.h> Shuffle some headers. Remove #include
2001-03-29  Kjartan Maraas  <kmaraas@gnome.org>

	* e-corba-utils.h: Remove #include <glib.h>
	* e-dialog-widgets.c: Shuffle some headers.
	* e-dialog-widgets.h: Remove #include <libgnomeui/gnome-propertybox.h>
	* e-gtk-utils.c: #include <gtk/gtksignal.h>
	* e-gtk-utils.h: Replace #include <gtk/gtk.h>
	* e-gui-utils.c: Replace #include <gnome.h>
	* e-html-utils.c: Shuffle headers.
	* e-iterator.c: Replace #include <gtk/gtk.h>
	* e-iterator.h: Replace #include <gtk/gtk.h>
	* e-list-iterator.c: Remove #include <gtk/gtk.h>
	* e-list-iterator.h: Replace #include <gtk/gtk.h>
	* e-list.c: Remove #include <gtk/gtk.h>
	* e-list.h: Replace #include <gtk/gtk.h>
	* e-memory.c: #include <string.h> and <stdlib.h>
	* e-msgport.c: Move around some includes. s/%d/%ld/g in a printf()
	call to fix a warning.
	* e-pilot-map.c: #include <string.h>. Replace #include <gnome.h>
	* e-pilot-util.c: Remove #include <gnome.h>
	* e-sexp.c: Remove #include <glib.h>
	* e-sexp.h: Replace #include <gtk/gtk.h>
	* e-time-utils.c: #include <string.h>
	* md5-utils.c: Shuffle headers.
	* test-ename-western-gtk.c: Replace #include <gnome.h>
	* test-ename-western.c: Same here.

svn path=/trunk/; revision=9016
2001-03-29 18:07:13 +00:00
fc1cb88c14 Changed to allocate raw blocks for the data, and keep track of them with
2001-02-08  Not Zed  <NotZed@Ximian.com>

        * e-memory.c (EMemChunk): Changed to allocate raw blocks for the
        data, and keep track of them with an array, this is so the native
        malloc alignment is not lost at the allocation stage.

svn path=/trunk/; revision=8100
2001-02-08 03:19:37 +00:00
3fa03e87ea Fix typename of args (for all funcs). (e_strv_set_ref): Assert the index
2000-11-30  Not Zed  <NotZed@HelixCode.com>

        * e-memory.c (e_strv_new): Fix typename of args (for all funcs).
        (e_strv_set_ref): Assert the index is in range.
        (e_strv_set_ref_free): "
        (e_strv_set): "
        (e_strv_get): "

svn path=/trunk/; revision=6733
2000-11-30 11:50:11 +00:00
fe151f1599 Plug a memleak, need to free results from term_eval(). (term_eval_gt):
2000-11-29  Not Zed  <NotZed@HelixCode.com>

        * e-sexp.c (term_eval_lt): Plug a memleak, need to free results
        from term_eval().
        (term_eval_gt):
        (term_eval_eq):

2000-11-27  Not Zed  <NotZed@HelixCode.com>

        * e-memory.c (e_mempool_new): Added some locking to global data.
        This should make the interfaces mt-safe, although each object is
        only per-thread safe.

svn path=/trunk/; revision=6710
2000-11-29 10:29:56 +00:00
17c69cb3be New function, set a reference to a string that is then owned/free'd by the
2000-11-22  Not Zed  <NotZed@HelixCode.com>

        * e-memory.c
        (e_strv_set_ref_free): New function, set a reference to a string
        that is then owned/free'd by the strv.
        (e_strv_destroy): If there are any strings to destroy, free them
        here.

svn path=/trunk/; revision=6645
2000-11-22 00:45:40 +00:00
477df7090a If we dont get a big enough chunk in the first node, give up. Otherwise we
2000-11-22  Not Zed  <NotZed@HelixCode.com>

        * e-memory.c (e_mempool_alloc): If we dont get a big enough chunk
        in the first node, give up.  Otherwise we spend too much time
        searching.
        (e_mempool_strdup): Doh, and allocate enough for the terminating
        NUL at that.

svn path=/trunk/; revision=6631
2000-11-21 14:59:13 +00:00
bb09c40e2f New function to strdup into a mempool.
2000-11-21  Not Zed  <NotZed@HelixCode.com>

        * e-memory.c
        (e_mempool_strdup): New function to strdup into a mempool.

svn path=/trunk/; revision=6630
2000-11-21 14:31:41 +00:00
4639aa999e New function to allocate a zero'd out chunk.
2000-11-21  Not Zed  <NotZed@HelixCode.com>

        * e-memory.c (e_memchunk_alloc0): New function to allocate a
        zero'd out chunk.

svn path=/trunk/; revision=6624
2000-11-21 04:01:10 +00:00
79f6be42c0 New routines for fast memory management and compact string array storage.
2000-11-20  Not Zed  <NotZed@HelixCode.com>

        * e-memory.[ch]: New routines for fast memory management and
        compact string array storage.

        * Makefile.am (libeutil_la_SOURCES): Added e-memory.[ch].

svn path=/trunk/; revision=6619
2000-11-20 23:57:32 +00:00