Branch: Tag:

2002-11-24

2002-11-24 22:47:06 by Martin Stjernholm <mast@lysator.liu.se>

Changed some block_allocs to tune to memory pages.

Rev: src/backend.cmod:1.31
Rev: src/constants.c:1.44
Rev: src/constants.h:1.28
Rev: src/gc.c:1.189
Rev: src/interpret.c:1.283
Rev: src/las.c:1.315
Rev: src/mapping.c:1.155
Rev: src/multiset.c:1.59
Rev: src/multiset.h:1.29
Rev: src/object.c:1.210
Rev: src/object.h:1.75
Rev: src/pike_memory.c:1.127
Rev: src/program.c:1.462
Rev: src/program.h:1.169

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: las.c,v 1.314 2002/11/24 21:57:16 grubba Exp $ + || $Id: las.c,v 1.315 2002/11/24 22:47:06 mast Exp $   */      #include "global.h" - RCSID("$Id: las.c,v 1.314 2002/11/24 21:57:16 grubba Exp $"); + RCSID("$Id: las.c,v 1.315 2002/11/24 22:47:06 mast Exp $");      #include "language.h"   #include "interpret.h"
368:   }       - #define NODES 128 /* 256 */ -  +    #undef BLOCK_ALLOC_NEXT   #define BLOCK_ALLOC_NEXT u.node.a   
378:    NODE->token = USHRT_MAX; \    } while (0)    - BLOCK_ALLOC(node_s, NODES) + BLOCK_ALLOC_FILL_PAGES(node_s, 2)    -  + #define NODES (sizeof (((struct node_s_block *) NULL)->x) / sizeof (struct node_s)) +    #undef BLOCK_ALLOC_NEXT   #define BLOCK_ALLOC_NEXT next   
565:    {    node *tmp;    struct node_s_block *tmp2; -  int e=0; +  size_t e=0;      #ifndef PIKE_DEBUG    if(cumulative_parse_error)
575:    for(tmp2=node_s_blocks;tmp2;tmp2=tmp2->next) e+=tmp2->used;    if(e)    { -  int e2=e; +  size_t e2=e;    struct node_s_block *nextblk;    for(tmp2=node_s_blocks;tmp2;tmp2=nextblk)    {