Branch: Tag:

2006-05-10

2006-05-10 19:43:54 by Martin Stjernholm <mast@lysator.liu.se>

Show the size of the block that was attempted to be allocated when an out of
memory error occurs.

Rev: src/array.c:1.192
Rev: src/error.c:1.146
Rev: src/pike_error.h:1.38
Rev: src/pike_memory.c:1.176

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.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"
101:    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);