pike.git/
src/
mapping.c
Branch:
Tag:
Non-build tags
All tags
No tags
2008-06-26
2008-06-26 09:30:49 by Henrik Grubbström (Grubba) <grubba@grubba.org>
9406510d4e2a42b38e78ecae300540833c7be7c1 (
12
lines) (+
8
/-
4
)
[
Show
|
Annotate
]
Branch:
7.9
Avoid marking the empty mapping data as dirty.
Rev: src/mapping.c:1.206
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: mapping.c,v 1.
205
2008/06/
25
17
:
48
:
10
grubba Exp $
+
|| $Id: mapping.c,v 1.
206
2008/06/
26
09
:
30
:
49
grubba Exp $
*/ #include "global.h"
415:
if(d_flag>1) check_mapping(m); #endif
+
if (md->hashsize == new_size) return m;
+
init_mapping(m, new_size, md->flags); debug_malloc_touch(m); new_md=m->data;
1009:
{ debug_malloc_touch(m); rehash(m, MAP_SLOTS(m->data->size + !!md->generation_cnt));
+
if (m->data->hashsize)
+
m->data->flags |= MAPPING_DIRTY;
}
-
+
else
+
md->flags |= MAPPING_DIRTY;
-
/* Note: md may be invalid here dure to the rehash above. */
-
m->data->flags |= MAPPING_DIRTY;
-
+
#ifdef PIKE_DEBUG if(d_flag>1) check_mapping(m); #endif