pike.git / src / array.c

version» Context lines:

pike.git/src/array.c:1:   /*   || 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.191 2006/04/03 17:12:44 grubba Exp $ + || $Id: array.c,v 1.192 2006/05/10 19:43:54 mast Exp $   */      #include "global.h"   #include "svalue.h"   #include "array.h"   #include "object.h"   #include "las.h"   #include "stralloc.h"   #include "interpret.h"   #include "opcodes.h"
pike.git/src/array.c:94:       /* Limits size to (1<<29)-4 */    if( (size_t)(size+extra_space-1) >    (LONG_MAX-sizeof(struct array))/sizeof(struct svalue) )    Pike_error("Too large array (size %ld exceeds %ld).\n",    (long)(size+extra_space-1),    (long)((LONG_MAX-sizeof(struct array))/sizeof(struct svalue)) );    v=(struct array *)malloc(sizeof(struct array)+    (size+extra_space-1)*sizeof(struct svalue));    if(!v) -  Pike_error(msg_out_of_mem); +  Pike_error(msg_out_of_mem_2, sizeof(struct array)+ +  (size+extra_space-1)*sizeof(struct svalue));       GC_ALLOC(v);          if (size+extra_space)    /* for now, we don't know what will go in here */    v->type_field = BIT_MIXED | BIT_UNFINISHED;    else    v->type_field = 0;    v->flags=0;