diff options
author | Xavier Leroy <xavier.leroy@inria.fr> | 1996-11-15 15:24:14 +0000 |
---|---|---|
committer | Xavier Leroy <xavier.leroy@inria.fr> | 1996-11-15 15:24:14 +0000 |
commit | 1c277b8b04591e7a1bbdad8a8d938756a0ee364d (patch) | |
tree | 516a8e2f9ee6a92dd6fb3691df3910b817ea7b4f /asmrun/array.c | |
parent | 3d1f8de2cf30018d746567949353f1a4a33ba188 (diff) |
array.c: utiliser check_urgent_gc
signals.c: #include "callback.h"
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@1193 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
Diffstat (limited to 'asmrun/array.c')
-rw-r--r-- | asmrun/array.c | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/asmrun/array.c b/asmrun/array.c index 9c117e3bf..1ed9edd57 100644 --- a/asmrun/array.c +++ b/asmrun/array.c @@ -35,10 +35,12 @@ value make_vect(len, init) wsize = size * Double_wosize; if (wsize > Max_wosize) invalid_argument("Array.new"); - if (wsize < Max_young_wosize) + if (wsize < Max_young_wosize) { res = alloc(wsize, Double_array_tag); - else + } else { res = alloc_shr(wsize, Double_array_tag); + res = check_urgent_gc (res); + } for (i = 0; i < size; i++) { Store_double_field(res, i, d); } @@ -60,12 +62,14 @@ value make_vect(len, init) res = alloc_shr(size, 0); init = root[0]; for (i = 0; i < size; i++) Field(res, i) = init; + res = check_urgent_gc (res); } else { root[0] = init; res = alloc_shr(size, 0); init = root[0]; for (i = 0; i < size; i++) initialize(&Field(res, i), init); + res = check_urgent_gc (res); } Pop_roots(); } @@ -93,10 +97,12 @@ value make_array(init) Pop_roots(); invalid_argument("Array.new"); } - if (wsize < Max_young_wosize) + if (wsize < Max_young_wosize) { res = alloc(wsize, Double_array_tag); - else + } else { res = alloc_shr(wsize, Double_array_tag); + res = check_urgent_gc (res); + } init = root[0]; for (i = 0; i < size; i++) { Store_double_field(res, i, Double_val(Field(init, i))); |