From ce9787a43951d7c07afe2ffa354da603aa14aa82 Mon Sep 17 00:00:00 2001 From: Jonas 'Sortie' Termansen Date: Sat, 26 Nov 2011 20:25:25 +0100 Subject: [PATCH] Greatly reduced RAM usage in ramfs. --- sortix/fs/ramfs.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/sortix/fs/ramfs.cpp b/sortix/fs/ramfs.cpp index 086e4547..08275590 100644 --- a/sortix/fs/ramfs.cpp +++ b/sortix/fs/ramfs.cpp @@ -131,6 +131,7 @@ namespace Sortix if ( buffersize < offset + count ) { uintmax_t newsize = (uintmax_t) offset + (uintmax_t) count; + if ( newsize < buffersize * 2 ) { newsize = buffersize * 2; } if ( !Resize(newsize) ) { return -1; } }