Comments (4)
No, mallocinfo()
only exists in SunOS. FreeBSD doesn't have it.
As an alternative, you can use Google's tcmalloc from the google-perftools package.
google-perftools has better performance than most other malloc libraries, and it provides all sorts of information about memory allocator.
from core.
Is this malloc documentation available on your FreeBSD? It should also be possible (albeit a pain) to extract memory information from the malloc_stats_print
function described there.
I created #411. Can you see if it fixes the first warning?
from core.
BSD might require -lmalloc
according to the manpage.
from core.
I don't have a BSD system of my own and won't be able to spin up a VM for a few weeks. Since PCU_GetMem
and pumi_getMem
are only used in debug messages in a few places, it's probably ok to do something like this for now (until a more robust fix for FreeBSD is added):
diff --git a/pcu/pcu_mem.c b/pcu/pcu_mem.c
index 8ac2345c..5532ffac 100644
--- a/pcu/pcu_mem.c
+++ b/pcu/pcu_mem.c
@@ -8,6 +8,7 @@
*******************************************************************************/
#include <PCU.h>
+#include "reel.h" // reel_fail
#if defined(__APPLE__)
@@ -54,5 +55,7 @@ double PCU_GetMem() {
#elif defined(__GNUC__)
struct mallinfo meminfo_now = mallinfo();
return ((double)meminfo_now.arena)/M;
+#else
+ reel_fail("mallinfo not supported.");
#endif
}
Or, if you want those tests to run more or less successfully:
diff --git a/pcu/pcu_mem.c b/pcu/pcu_mem.c
index 8ac2345c..889650fb 100644
--- a/pcu/pcu_mem.c
+++ b/pcu/pcu_mem.c
@@ -54,5 +54,7 @@ double PCU_GetMem() {
#elif defined(__GNUC__)
struct mallinfo meminfo_now = mallinfo();
return ((double)meminfo_now.arena)/M;
+#else
+ return 0.0;
#endif
}
In any case, I'm sure there are other systems where mallinfo isn't available, so there ought to be a solution.
from core.
Related Issues (20)
- chef: geombc boundary element 'face type' string shouldn't be in the interior block tag
- building develop with Simmetrix SimModSuite fails with pMesh symbol conflict HOT 1
- PUMI 2.2.8 Release HOT 1
- verify does not understand geometric models that have entities without mesh entities HOT 1
- node order for 10-node tet
- Build fails with PHASTA code HOT 16
- Compilation issues on Ubuntu 22.04 HOT 9
- Steady increase in memory use when running createMdsMesh HOT 1
- ctest failures on rhel9 system
- compiling with `fatal error: mpi.h: No such file or directory` HOT 1
- Memory leaks in capstone tests
- PUMI 2.2.9 Release
- CreateMG and Python support interfere with each other HOT 2
- 3 tests fail HOT 2
- gmsh.cc: add test that passes an input .dmg model HOT 2
- Wrong vertex classification on a partitioned mesh starting from a gmsh generated mesh HOT 6
- use netcdf find_package via pkg-config
- Expecting one or two elements per part from split and zsplit HOT 2
- api for evaluation of fields in element HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from core.