Mercurial > hg > graal-compiler
comparison src/os_cpu/linux_zero/vm/os_linux_zero.cpp @ 1176:d11ce1551e8d
6917698: os::is_allocatable Zero fix for 32-bit platforms
Summary: Recent changes call os::is_allocatable which was not implemented in Zero.
Reviewed-by: twisti
Contributed-by: Edward Nevill <ed@camswl.com>
author | twisti |
---|---|
date | Mon, 18 Jan 2010 05:02:41 -0800 |
parents | 354d3184f6b2 |
children | 67d74f7a15d9 |
comparison
equal
deleted
inserted
replaced
1175:614b7e3a9f48 | 1176:d11ce1551e8d |
---|---|
1 /* | 1 /* |
2 * Copyright 2003-2007 Sun Microsystems, Inc. All Rights Reserved. | 2 * Copyright 2003-2007 Sun Microsystems, Inc. All Rights Reserved. |
3 * Copyright 2007, 2008 Red Hat, Inc. | 3 * Copyright 2007, 2008, 2009, 2010 Red Hat, Inc. |
4 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. | 4 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
5 * | 5 * |
6 * This code is free software; you can redistribute it and/or modify it | 6 * This code is free software; you can redistribute it and/or modify it |
7 * under the terms of the GNU General Public License version 2 only, as | 7 * under the terms of the GNU General Public License version 2 only, as |
8 * published by the Free Software Foundation. | 8 * published by the Free Software Foundation. |
237 void os::Linux::set_fpu_control_word(int fpu) { | 237 void os::Linux::set_fpu_control_word(int fpu) { |
238 ShouldNotCallThis(); | 238 ShouldNotCallThis(); |
239 } | 239 } |
240 | 240 |
241 bool os::is_allocatable(size_t bytes) { | 241 bool os::is_allocatable(size_t bytes) { |
242 ShouldNotCallThis(); | 242 #ifdef _LP64 |
243 return true; | |
244 #else | |
245 if (bytes < 2 * G) { | |
246 return true; | |
247 } | |
248 | |
249 char* addr = reserve_memory(bytes, NULL); | |
250 | |
251 if (addr != NULL) { | |
252 release_memory(addr, bytes); | |
253 } | |
254 | |
255 return addr != NULL; | |
256 #endif // _LP64 | |
243 } | 257 } |
244 | 258 |
245 /////////////////////////////////////////////////////////////////////////////// | 259 /////////////////////////////////////////////////////////////////////////////// |
246 // thread stack | 260 // thread stack |
247 | 261 |