Re: [Vala] Gee LinkedList Problem : Memory allocation fails when list size > 1000000



No : my Mac Mini has 2GB of RAM, 1.5 of which are currently free.

My guess is that the code of linkedlist.c (from libgee) is not (yet)
entirely portable between Linux and Mac.

Perhaps  int should be changed by uint or long in the code of
linkedlist.c or something like that.

Serge.


On Tue, Jun 14, 2011 at 2:54 PM, Reid Thompson <Reid Thompson ateb com> wrote:

On 06/14/2011 02:30 AM, Serge Hulne wrote:

Example:

NB : The example hereunder works perfectly with a number of elements<=
100,000 but crashes if one when the number of elements to insert in the List
is>= 1000,000 .


    var L = new LinkedList<pair?>( (EqualFunc) equals);

    // Insert in List (to sort)
    pair p = pair();
    for (var i=0; i<1000000; i++) {
        p.word = "test";
        p.freq = 1;
        L.add(p);

does not fail on my box.  are you running out of memory?




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]