aboutsummaryrefslogtreecommitdiff
path: root/libjava/prims.cc
diff options
context:
space:
mode:
authorJeff Sturm <jsturm@sigma6.com>1999-11-05 17:34:32 +0000
committerTom Tromey <tromey@gcc.gnu.org>1999-11-05 17:34:32 +0000
commit3948f9d08f16115e491d5dc8d08fa7d6fb0f0917 (patch)
treeebda040f8b4643c80197d33f51c2bab7223b79b8 /libjava/prims.cc
parentea638d6c94c1c5accf258a2a6c2358ceeef475f7 (diff)
downloadgcc-3948f9d08f16115e491d5dc8d08fa7d6fb0f0917.zip
gcc-3948f9d08f16115e491d5dc8d08fa7d6fb0f0917.tar.gz
gcc-3948f9d08f16115e491d5dc8d08fa7d6fb0f0917.tar.bz2
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
Diffstat (limited to 'libjava/prims.cc')
-rw-r--r--libjava/prims.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/libjava/prims.cc b/libjava/prims.cc
index 6e6c633..6b37d55 100644
--- a/libjava/prims.cc
+++ b/libjava/prims.cc
@@ -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;
}