[llvm-commits] lib/System Changes
reid at x10sys.com
Sat Sep 11 00:13:01 PDT 2004
I have recently committed several lib/System changes. As with previous
commits, the changes work on Linux but for other platforms I'm only
"guessing" at the implementation based on available documentation. Your
mileage might vary. If this breaks compilation on your platform, please
correct the implementation and check it in or submit patches to me and
I'll check it in.
Here's the details of my recent additions ..
(1) Allocating RWX memory is used by the JIT Emitter for code generation
and execution. The JIT software is now platform independent in this
regard by using the new sys::Memory::AllocateRWX function. This function
has been implemented to use variants of mmap on Unix platforms and
VirtualAlloc on Win32.
(2) The functions in "FileUtilities.h" for checking magic numbers and
determining the type of a function have been added to the Path class.
There are three new methods: has_magic_number, is_bytecode_file, and
is_archive. These have been implemented as "generic Unix" functions in
the lib/System/Unix directory. They *should* work on all Unix platforms.
The functions haven't been implemented for Win32.
(3) The sys::Process::GetPageSize() method has been implemented in two
ways. Older unix systems can use the lib/System/Unix/Process.cpp
implementation that is based on the old getpagesize(3) function. This
has been deprecated in SUSv2 and doesn't exist in POSIX 1003.1. The new
way to get this value is with sysconf(_SC_PAGE_SIZE). That
implementation can be found in lib/System/Unix/SUS/Process.cpp file. If
your platform supports sysconf(2), please convert the #include in
Sorry for the inconvenience if any of this has broken your build.
Someday soon, I'll have three or four different types of machines
available so I can do this testing myself.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 189 bytes
Desc: This is a digitally signed message part
More information about the llvm-commits