Salome HOME
PAL14921 (memory limitation and Salome freeze)
[modules/smesh.git] / src / SMDS / SMDS_Mesh.hxx
index 130e05d444c75445d1a3a17307294e13d0811007..324b961acdee410165999c4fd2520d0b04b52a68 100644 (file)
@@ -491,6 +491,13 @@ public:
   const SMDS_MeshFace *FindFace(std::vector<int> nodes_ids) const;
   static const SMDS_MeshFace* FindFace(std::vector<const SMDS_MeshNode *> nodes);
 
+  /*!
+   * \brief Raise an exception if free memory (ram+swap) too low
+    * \param doNotRaise - if true, suppres exception, just return bool
+    * \retval bool - true if there is enough memory
+   */
+  static bool CheckMemory(const bool doNotRaise=false) throw (std::bad_alloc);
+
   int MaxNodeID() const;
   int MinNodeID() const;
   int MaxElementID() const;