|
|
385abae |
Description: <short summary of the patch>
|
|
|
385abae |
TODO: Put a short summary on the line above and replace this paragraph
|
|
|
385abae |
with a longer explanation of this change. Complete the meta-information
|
|
|
385abae |
with other relevant fields (see below for details). To make it easier, the
|
|
|
385abae |
information below has been extracted from the changelog. Adjust it or drop
|
|
|
385abae |
it.
|
|
|
385abae |
.
|
|
|
385abae |
gcl (2.6.12-52) unstable; urgency=medium
|
|
|
385abae |
.
|
|
|
385abae |
* list_order.8
|
|
|
385abae |
Author: Camm Maguire <camm@debian.org>
|
|
|
385abae |
|
|
|
385abae |
---
|
|
|
385abae |
The information above should follow the Patch Tagging Guidelines, please
|
|
|
385abae |
checkout http://dep.debian.net/deps/dep3/ to learn about the format. Here
|
|
|
385abae |
are templates for supplementary fields that you might want to add:
|
|
|
385abae |
|
|
|
385abae |
Origin: <vendor|upstream|other>, <url of original patch>
|
|
|
385abae |
Bug: <url in upstream bugtracker>
|
|
|
385abae |
Bug-Debian: https://bugs.debian.org/<bugnumber>
|
|
|
385abae |
Bug-Ubuntu: https://launchpad.net/bugs/<bugnumber>
|
|
|
385abae |
Forwarded: <no|not-needed|url proving that it has been forwarded>
|
|
|
385abae |
Reviewed-By: <name and email of someone who approved the patch>
|
|
|
385abae |
Last-Update: 2017-06-18
|
|
|
385abae |
|
|
|
385abae |
--- gcl-2.6.12.orig/o/gbc.c
|
|
|
385abae |
+++ gcl-2.6.12/o/gbc.c
|
|
|
385abae |
@@ -959,7 +959,7 @@ mark_c_stack(jmp_buf env1, int n, void (
|
|
|
385abae |
static void
|
|
|
385abae |
sweep_phase(void) {
|
|
|
385abae |
|
|
|
385abae |
- STATIC long j, k;
|
|
|
385abae |
+ STATIC long j, k, l;
|
|
|
385abae |
STATIC object x;
|
|
|
385abae |
STATIC char *p;
|
|
|
385abae |
STATIC struct typemanager *tm;
|
|
|
385abae |
@@ -977,26 +977,28 @@ sweep_phase(void) {
|
|
|
385abae |
|
|
|
385abae |
p = pagetochar(page(v));
|
|
|
385abae |
f = FREELIST_TAIL(tm);
|
|
|
385abae |
- k = 0;
|
|
|
385abae |
+ l = k = 0;
|
|
|
385abae |
for (j = tm->tm_nppage; j > 0; --j, p += tm->tm_size) {
|
|
|
385abae |
x = (object)p;
|
|
|
385abae |
|
|
|
385abae |
if (is_marked(x)) {
|
|
|
385abae |
unmark(x);
|
|
|
385abae |
+ l++;
|
|
|
385abae |
continue;
|
|
|
385abae |
}
|
|
|
385abae |
|
|
|
385abae |
+ k++;
|
|
|
385abae |
+
|
|
|
385abae |
make_free(x);
|
|
|
385abae |
SET_LINK(f,x);
|
|
|
385abae |
f = x;
|
|
|
385abae |
- k++;
|
|
|
385abae |
|
|
|
385abae |
}
|
|
|
385abae |
|
|
|
385abae |
SET_LINK(f,OBJNULL);
|
|
|
385abae |
tm->tm_tail = f;
|
|
|
385abae |
tm->tm_nfree += k;
|
|
|
385abae |
- pagetoinfo(page(v))->in_use=tm->tm_nppage-k;
|
|
|
385abae |
+ pagetoinfo(page(v))->in_use=l;
|
|
|
385abae |
|
|
|
385abae |
}
|
|
|
385abae |
|
|
|
385abae |
--- gcl-2.6.12.orig/o/sgbc.c
|
|
|
385abae |
+++ gcl-2.6.12/o/sgbc.c
|
|
|
385abae |
@@ -152,7 +152,7 @@ sgc_mark_phase(void) {
|
|
|
385abae |
|
|
|
385abae |
static void
|
|
|
385abae |
sgc_sweep_phase(void) {
|
|
|
385abae |
- STATIC long j, k;
|
|
|
385abae |
+ STATIC long j, k, l;
|
|
|
385abae |
STATIC object x;
|
|
|
385abae |
STATIC char *p;
|
|
|
385abae |
STATIC struct typemanager *tm;
|
|
|
385abae |
@@ -160,13 +160,18 @@ sgc_sweep_phase(void) {
|
|
|
385abae |
int size;
|
|
|
385abae |
STATIC struct pageinfo *v;
|
|
|
385abae |
|
|
|
385abae |
+ for (j= t_start; j < t_contiguous ; j++) {
|
|
|
385abae |
+ tm_of(j)->tm_free=OBJNULL;
|
|
|
385abae |
+ tm_of(j)->tm_nfree=0;
|
|
|
385abae |
+ }
|
|
|
385abae |
+
|
|
|
385abae |
for (v=cell_list_head;v;v=v->next) {
|
|
|
385abae |
|
|
|
385abae |
tm = tm_of((enum type)v->type);
|
|
|
385abae |
|
|
|
385abae |
p = pagetochar(page(v));
|
|
|
385abae |
f = FREELIST_TAIL(tm);
|
|
|
385abae |
- k = 0;
|
|
|
385abae |
+ l = k = 0;
|
|
|
385abae |
size=tm->tm_size;
|
|
|
385abae |
|
|
|
385abae |
if (v->sgc_flags&SGC_PAGE_FLAG) {
|
|
|
385abae |
@@ -175,10 +180,9 @@ sgc_sweep_phase(void) {
|
|
|
385abae |
|
|
|
385abae |
x = (object)p;
|
|
|
385abae |
|
|
|
385abae |
- if (is_free(x))
|
|
|
385abae |
- continue;
|
|
|
385abae |
- else if (is_marked(x)) {
|
|
|
385abae |
+ if (is_marked(x)) {
|
|
|
385abae |
unmark(x);
|
|
|
385abae |
+ l++;
|
|
|
385abae |
continue;
|
|
|
385abae |
}
|
|
|
385abae |
|
|
|
385abae |
@@ -187,26 +191,26 @@ sgc_sweep_phase(void) {
|
|
|
385abae |
continue;
|
|
|
385abae |
#endif
|
|
|
385abae |
|
|
|
385abae |
- /* it is ok to free x */
|
|
|
385abae |
-
|
|
|
385abae |
- SET_LINK(f,x);
|
|
|
385abae |
+ k++;
|
|
|
385abae |
make_free(x);
|
|
|
385abae |
+ SET_LINK(f,x);
|
|
|
385abae |
+ f = x;
|
|
|
385abae |
+
|
|
|
385abae |
#ifndef SGC_WHOLE_PAGE
|
|
|
385abae |
if (TYPEWORD_TYPE_P(v->type)) x->d.s = SGC_RECENT;
|
|
|
385abae |
#endif
|
|
|
385abae |
- f = x;
|
|
|
385abae |
- k++;
|
|
|
385abae |
|
|
|
385abae |
}
|
|
|
385abae |
+
|
|
|
385abae |
SET_LINK(f,OBJNULL);
|
|
|
385abae |
tm->tm_tail = f;
|
|
|
385abae |
tm->tm_nfree += k;
|
|
|
385abae |
- v->in_use-=k;
|
|
|
385abae |
+ v->in_use=l;
|
|
|
385abae |
|
|
|
385abae |
} else if (WRITABLE_PAGE_P(page(v))) /*non sgc_page */
|
|
|
385abae |
for (j = tm->tm_nppage; --j >= 0; p += size) {
|
|
|
385abae |
x = (object)p;
|
|
|
385abae |
- if (is_marked(x) && !is_free(x)) {
|
|
|
385abae |
+ if (is_marked(x)) {
|
|
|
385abae |
unmark(x);
|
|
|
385abae |
}
|
|
|
385abae |
}
|