提交 3bcb9be2 编写于 作者: T twisti

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: NEdward Nevill <ed@camswl.com>
上级 ed37f594
/* /*
* Copyright 2003-2007 Sun Microsystems, Inc. All Rights Reserved. * Copyright 2003-2007 Sun Microsystems, Inc. All Rights Reserved.
* Copyright 2007, 2008 Red Hat, Inc. * Copyright 2007, 2008, 2009, 2010 Red Hat, Inc.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
...@@ -239,7 +239,21 @@ void os::Linux::set_fpu_control_word(int fpu) { ...@@ -239,7 +239,21 @@ void os::Linux::set_fpu_control_word(int fpu) {
} }
bool os::is_allocatable(size_t bytes) { bool os::is_allocatable(size_t bytes) {
ShouldNotCallThis(); #ifdef _LP64
return true;
#else
if (bytes < 2 * G) {
return true;
}
char* addr = reserve_memory(bytes, NULL);
if (addr != NULL) {
release_memory(addr, bytes);
}
return addr != NULL;
#endif // _LP64
} }
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册