Commit Graph

21 Commits

Author SHA1 Message Date
Cedric BAIL efbc90ff87 eina: make use of the new near allocation policy for Eina_List.
The idea is to improve memory locality and hopefully get better cache hit
in general.

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Differential Revision: https://phab.enlightenment.org/D10536
2019-10-30 08:14:28 -07:00
Mike Blumenkrantz cd97c2a0b7 eina/list: move dead code inside corresponding #ifdef
Summary:
this is debug code

CID 1404753, 1404745
Depends on D10204

Reviewers: cedric

Reviewed By: cedric

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D10205
2019-09-26 17:59:29 -04:00
Wonki Kim 4c489d5a2e eina_list: fix to check a null argument
Summary:
data should be checked regardless of EINA_MAGIC define,
because it is dereferenced in the following logic.

Reviewers: cedric, bu5hm4n, Hermet

Reviewed By: Hermet

Subscribers: #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D9750
2019-08-27 20:23:29 +09:00
Carsten Haitzler 2be2c3c6c3 eina list - make eina list magic optional and for now turn it off
this should bring our list nodes back to 32bytes (or 16 on 32bit)
which is the rounded up libc allocation size anyway expected. less mem
usage but less safety. i haven't seen any magic complainets to do with
eina list for a while now... so let's see.
2019-08-21 20:02:24 +01:00
Vincent Torri ce9cad3a3b Eina: replace Evil.h with evil_private.h and remove Evil.h when not necessary
Test Plan: compilation

Reviewers: raster, zmike, cedric

Reviewed By: zmike

Subscribers: #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D8903
2019-05-16 13:48:59 -04:00
Vincent Torri 0cdd501246 EFL For WIN32: Replace HAVE_EVIL define with _WIN32 2017-09-22 05:06:10 -05:00
Jean-Philippe Andre 5db3e557c5 eina_list: Ensure single init
This fixes a crash in make check when --profile=dev is explicitely
enabled. eina_list_init() is called by the standard eina_init() loop
and by eina_debug_init() as well.

Honestly I'm not sure why it doesn't crash for other people as
well...

The crash was in eolian_suite during the second eina_init (called
from eolian_init).
2017-07-20 17:47:51 +09:00
Flavio Ceolin 1cbd32aca1 eina:list: Fix resource leak
Summary:
The usage of the macro EINA_MAGIC_CHECK_LIST can
lead (in some cases) to leaks.

Signed-off-by: Flavio Ceolin <flavio.ceolin@gmail.com>

Reviewers: jpeg

Reviewed By: jpeg

Subscribers: cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D4679
2017-02-28 16:00:45 +09:00
Carsten Haitzler ac861be550 eina list - use free queue to defer freeing list nodes and accting
this should help with robustness a little bit by keeping nodes in the
free queue purgatory until enteirng idle etc.

@feature
2016-11-06 13:13:10 +09:00
Anand 120305b08e eina: Applied NULL check
Summary:
In _eina_list_setup_accounting function
{
...
...
if (!list->accounting)
     goto on_error;
...
...
on_error:
   _eina_list_mempool_list_free(list);
}

_eina_list_mempool_list_free function deference the "list->accounting"
variable which is already NULL.

Reviewers: JackDanielZ, jpeg

Reviewed By: jpeg

Subscribers: cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D3376
2015-11-24 17:50:21 +09:00
Michal Jagiello 6b88246808 eina: add eina_list_data_idx().
Summary:
Now the developer has to iterate the whole list to find the
index of the first occurence of the data.
I see that it is possible to get the index of the item for
the genlist widget, but for the eina_list not.

With these APIs it will be easier to implement *index_get
functions for the rest of widgets which contain items (Elm_List,
Elm_Ctxpopup etc.).

These functions returns the index of the given data or node in the eina_list.

Reviewers: Hermet, cedric

Subscribers: raster, cedric

Differential Revision: https://phab.enlightenment.org/D2189

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-03-25 19:40:41 +01:00
Amitesh Singh d25747c7f8 eina: Eina_List - remove obvious if() check.
Summary:
if (cmp == 0) - in false branch, cmp can not be equal to 0
else if (cmp < 0) - in false branch, cmp is atleast 1.
else if (cmp > 0) - it is abvious that cmp > 0.

Reviewers: cedric, seoz, raster

Subscribers: cedric, seoz

Differential Revision: https://phab.enlightenment.org/D1502

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2014-09-29 20:20:17 +02:00
Cedric BAIL 30a3df4c5c eina: removing more dead code looking for strange int.
CID 98377.
2014-06-05 03:30:43 +02:00
Daniel Juyung Seo 13d1e5dcf0 eina_list: Optimize eina_list_nth() call in case of index 0.
Check null and return the list data directly if the index 'n' is 0.
2014-03-04 00:03:01 +09:00
Felipe Magno de Almeida d63507446f eina: add eina_accessor_clone and update all Eina_Accessor to take advantage of it.
@feature.

Signed-off-by: Cedric Bail <cedric.bail@free.fr>
2014-02-25 18:04:47 -03:00
Carsten Haitzler 69e27abdc3 eina - and e3fl in general - stop using eina_error_get/set - useless really 2013-10-11 16:50:40 +09:00
Stefan Schmidt 9c1ed31c76 eina_list: Avoid NULL pointer deref in eina_list_shuffle.
If we have a valid but empty, n = 0, list we never enter the loop
and shuffled_last might still be NULL. Avoid this case by checking
explicitly for n = 0 before.
2013-06-25 15:18:33 +01:00
Jérémy Zurcher b4cad3c370 eina: add eina_list_shuffle
Summary: add uniform shuffle to Eina_List

Reviewers: cedric

Differential Revision: https://phab.enlightenment.org/D27
2013-03-20 12:19:13 +01:00
Jérémy Zurcher d0f3357f77 TES
Conflicts:
	src/lib/eina/eina_list.c
	src/lib/eina/eina_types.h
2013-03-20 11:48:44 +01:00
Vincent Torri 7fe3d35994 merge: __UNUSED__ --> EINA_UNUSED and some fixes in eo.
SVN revision: 77542
2012-10-05 20:09:47 +00:00
Vincent Torri 785f2a6b3a merge : add eina
currently, examples, tests and benchmark are not set. That's the next things i'll do


SVN revision: 76710
2012-09-16 10:57:48 +00:00