Description: <short summary of the patch>
TODO: Put a short summary on the line above and replace this paragraph
with a longer explanation of this change. Complete the meta-information
with other relevant fields (see below for details). To make it easier, the
information below has been extracted from the changelog. Adjust it or drop
it.
.
gcl (2.6.12-13) unstable; urgency=medium
.
* Version_2_6_13pre16
Author: Camm Maguire <camm@debian.org>
---
The information above should follow the Patch Tagging Guidelines, please
checkout http://dep.debian.net/deps/dep3/ to learn about the format. Here
are templates for supplementary fields that you might want to add:
Origin: <vendor|upstream|other>, <url of original patch>
Bug: <url in upstream bugtracker>
Bug-Debian: https://bugs.debian.org/<bugnumber>
Bug-Ubuntu: https://launchpad.net/bugs/<bugnumber>
Forwarded: <no|not-needed|url proving that it has been forwarded>
Reviewed-By: <name and email of someone who approved the patch>
Last-Update: <YYYY-MM-DD>
--- gcl-2.6.12.orig/o/alloc.c
+++ gcl-2.6.12/o/alloc.c
@@ -749,11 +749,15 @@ alloc_from_freelist(struct typemanager *
static inline void
grow_linear1(struct typemanager *tm) {
- fixnum maxgro=resv_pages ? available_pages : 0;
+ if (!sSAoptimize_maximum_pagesA || sSAoptimize_maximum_pagesA->s.s_dbind==Cnil) {
- if (tm->tm_type==t_relocatable) maxgro>>=1;
+ fixnum maxgro=resv_pages ? available_pages : 0;
- set_tm_maxpage(tm,grow_linear(tm->tm_npage,tm->tm_growth_percent,tm->tm_min_grow, tm->tm_max_grow,maxgro));
+ if (tm->tm_type==t_relocatable) maxgro>>=1;
+
+ set_tm_maxpage(tm,grow_linear(tm->tm_npage,tm->tm_growth_percent,tm->tm_min_grow, tm->tm_max_grow,maxgro));
+
+ }
}
@@ -802,7 +806,8 @@ do_gc_p(struct typemanager *tm,fixnum n)
pp=gc_page_max*phys_pages;
- return page(recent_allocation)>(1.0+gc_alloc_min-(double)ufmin(cpool,pp)/pp)*data_pages();
+ return page(recent_allocation)>(1.0+gc_alloc_min-(double)ufmin(cpool,pp)/pp)*data_pages() ||
+ 2*tpage(tm,n)>available_pages;
}
--- gcl-2.6.12.orig/o/main.c
+++ gcl-2.6.12/o/main.c
@@ -236,7 +236,7 @@ get_gc_environ(void) {
massert(mem_multiple>=0.0);
}
- gc_alloc_min=0.1;
+ gc_alloc_min=0.05;
if ((e=getenv("GCL_GC_ALLOC_MIN"))) {
massert(sscanf(e,"%lf",&gc_alloc_min)==1);
massert(gc_alloc_min>=0.0);
@@ -280,7 +280,7 @@ setup_maxpages(double scale) {
resv_pages=available_pages=0;
available_pages=check_avail_pages();
- resv_pages=40<available_pages ? 40 : available_pages;
+ resv_pages=available_pages/100;
available_pages-=resv_pages;
recent_allocation=0;