LLVM API Documentation

Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

Unix/Process.cpp

Go to the documentation of this file.
00001 //===- Unix/Process.cpp - Unix Process Implementation --------- -*- C++ -*-===//
00002 // 
00003 //                     The LLVM Compiler Infrastructure
00004 //
00005 // This file was developed by Reid Spencer and is distributed under the 
00006 // University of Illinois Open Source License. See LICENSE.TXT for details.
00007 // 
00008 //===----------------------------------------------------------------------===//
00009 //
00010 // This file provides the generic Unix implementation of the Process class.
00011 //
00012 //===----------------------------------------------------------------------===//
00013 
00014 #include <unistd.h>
00015 
00016 //===----------------------------------------------------------------------===//
00017 //=== WARNING: Implementation here must contain only generic UNIX code that
00018 //===          is guaranteed to work on *all* UNIX variants.
00019 //===----------------------------------------------------------------------===//
00020 
00021 namespace llvm {
00022 using namespace sys;
00023 
00024 unsigned 
00025 Process::GetPageSize() {
00026   // NOTE: The getpagesize function doesn't exist in POSIX 1003.1 and is 
00027   // "deprecated" in SUSv2. Platforms including this implementation should
00028   // consider sysconf(_SC_PAGE_SIZE) if its available. 
00029   static const int page_size = getpagesize();
00030   return static_cast<unsigned>(page_size);
00031 }
00032 
00033 }
00034 // vim: sw=2 smartindent smarttab tw=80 autoindent expandtab