Branch: Tag:

2008-07-18

2008-07-18 10:46:30 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Adjusted slice_array() threshold for O(n) operation.

Rev: src/array.c:1.218

2:   || This file is part of Pike. For copyright information see COPYRIGHT.   || Pike is distributed under GPL, LGPL and MPL. See the file COPYING   || for more information. - || $Id: array.c,v 1.217 2008/07/18 09:37:09 grubba Exp $ + || $Id: array.c,v 1.218 2008/07/18 10:46:30 grubba Exp $   */      #include "global.h"
726:       if(v->refs==1) /* Can we use the same array? */    { -  if((end-start)*2 > v->malloced_size) /* don't waste too much memory */ +  if((end-start)*4 > v->malloced_size) /* don't waste too much memory */    {    add_ref(v);    free_svalues(ITEM(v) + end, v->size - end, v->type_field);