Flesh out a page size accessor in the new API.
[oota-llvm.git] / include / llvm / Support / Process.h
index 6b29f57fc1c881c9597c0d5d30eca10afe48ab41..15fa3763c918a5873a1a71575df334418433bf71 100644 (file)
@@ -89,7 +89,27 @@ class self_process : public process {
 public:
   virtual id_type get_id();
 
+  /// \name Process configuration (sysconf on POSIX)
+  /// @{
+
+  /// \brief Get the virtual memory page size.
+  ///
+  /// Query the operating system for this process's page size.
+  size_t page_size() const { return PageSize; };
+
+  /// @}
+
 private:
+  /// \name Cached process state.
+  /// @{
+
+  /// \brief Cached page size, this cannot vary during the life of the process.
+  size_t PageSize;
+
+  /// @}
+
+  /// \brief Constructor, used by \c process::get_self() only.
+  self_process();
 };