This is the mail archive of the ecos-discuss@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

cyg_mempool_info


Hello!

I create a variable memory pool of size 4096.
A thread claims a block size of 4000.

typedef struct {
   cyg_int32 totalmem;
   cyg_int32 freemem;
   void *base;
   cyg_int32 size;
   cyg_int32 blocksize;
   cyg_int32 maxfree; // The largest free block
  } cyg_mempool_info;

Using this structure I get -

totalmem 4080
freemem 64
base 71776
size 4096
blocksize -1
maxfree 64 

---

Though maxfree is 64, I'm unable to even obtain a
block of 60 from the pool.
How did the figure of 64 end up as freemem? (It should
be more).
And how do I compute how much memory is now available
in the pool so that my mempool_var_alloc will not
fail?

Thanks
Kavita

__________________________________________________
Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail
http://personal.mail.yahoo.com/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]