From 75282af77799d7a1e7064564dd97add41bf5d088 Mon Sep 17 00:00:00 2001 From: David du Colombier <0intro@gmail.com> Date: Mon, 16 Aug 1993 00:00:00 +0000 Subject: [PATCH] Plan 9 from Bell Labs 1993-08-16 --- port/page.c | 10 ++++++++++ port/portdat.h | 3 +++ 2 files changed, 13 insertions(+) diff --git a/port/page.c b/port/page.c index 5faff2a23636f52b85c743be40ee78507cad81c0..aa28157b754d6272fb317a2f828e22dddfea6859 100644 --- a/port/page.c +++ b/port/page.c @@ -114,6 +114,12 @@ retry: unlock(p); goto retry; } + +if(p->log == 0) { + p->log = smalloc(8192); + p->lptr = 0; +} + uncachepage(p); p->ref++; p->va = va; @@ -228,6 +234,10 @@ duppage(Page *p) /* Always call with p locked */ unlock(np); return; } +if(np->log == 0) { + np->log = smalloc(8192); + np->lptr = 0; +} uncachepage(np); np->va = p->va; diff --git a/port/portdat.h b/port/portdat.h index 84245f6de1ccabadf88151b2f8188f364b5aea8f..42ea48a8fd5c31c5b9110772f33fd6d54ae1330b 100644 --- a/port/portdat.h +++ b/port/portdat.h @@ -311,6 +311,9 @@ struct Page Page *next; /* Lru free list */ Page *prev; Page *hash; /* Image hash chains */ + + uchar *log; + int lptr; }; struct Swapalloc