*
Jo*******@gmail.com:
>
The following function is what I want to call,
int
DbEnv::memp_stat(DB_MPOOL_STAT **gsp,
DB_MPOOL_FSTAT *(*fsp)[], u_int32_t flags);
The function has following description:
The DbEnv::memp_stat method creates statistical structures of type
DB_MPOOL_STAT and DB_MPOOL_FSTAT, and copy pointers to them into
user-specified memory locations.
Can anybody tell me how to allocate the memory to satisfy the function
requirement?
See the documentation and/or example code.
The quoted passage indicates that the function does the allocation, so
possibly you'd call it like
DB_MPOOL_STAT* stat;
DB_MPOOL_FSTAT** fstats;
int const result = memp_stat( &stat, &fstats, whatever );
However, you can't be sure without going to the documentation (and/or
example code); in particular you can't be sure how to /deallocate/.
Off-topicality:
Please note that questions about how to use a platform-specific library
are, in general, off-topic.
--
A: Because it messes up the order in which people normally read text.
Q: Why is it such a bad thing?
A: Top-posting.
Q: What is the most annoying thing on usenet and in e-mail?