boehm.cc (_Jv_GCSetInitialHeapSize): Swapped size & current.

1999-11-05  Jeff Sturm  <jsturm@sigma6.com>

	* boehm.cc (_Jv_GCSetInitialHeapSize): Swapped size & current.
	* prims.cc (parse_heap_size): Use end, not spec.  Use 1024
	multipler for `k'.

From-SVN: r30418
This commit is contained in:
Jeff Sturm 1999-11-05 17:34:32 +00:00 committed by Tom Tromey
parent ea638d6c94
commit 3948f9d08f
3 changed files with 11 additions and 5 deletions

View File

@ -1,3 +1,9 @@
1999-11-05 Jeff Sturm <jsturm@sigma6.com>
* boehm.cc (_Jv_GCSetInitialHeapSize): Swapped size & current.
* prims.cc (parse_heap_size): Use end, not spec. Use 1024
multipler for `k'.
1999-11-05 Tom Tromey <tromey@cygnus.com>
* java/lang/natThread.cc (stop): Removed argument name.

View File

@ -375,7 +375,7 @@ _Jv_GCSetInitialHeapSize (size_t size)
{
size_t current = GC_get_heap_size ();
if (size > current)
GC_expand_hp (current - size);
GC_expand_hp (size - current);
}
void

View File

@ -822,10 +822,10 @@ parse_heap_size (const char *spec)
{
char *end;
unsigned long val = strtoul (spec, &end, 10);
if (*spec == 'k' || *spec == 'K')
val *= 1000;
else if (*spec == 'm' || *spec == 'M')
val *= 1000000;
if (*end == 'k' || *end == 'K')
val *= 1024;
else if (*end == 'm' || *end == 'M')
val *= 1048576;
return (size_t) val;
}