On Tue, 29 Apr 2014 16:50:32 +0300, Binyamin Dissen wrote: >I assumed that such an API, which is given the 64 bit address and returns >memory object information, must exist. But I cannot find it. > >Am I too hopeful? > What's a "memory object"? I believe GEMAIN allows obtaining a large block of memory; subdividing it; and FREEMAINing it piecemeal. (I remember decades ago colleagues accustomed to this facility in Assembler complaining when required to use a HLL that did not allow it.) Does STORAGE allow likewise? Gedanken: Suppose I acquire 3KiB of storage, then return the bottom and top thirds, keeping the middle. Storage managment services will know nothing about that remaining 1KiB except its address and length. Is this the information you need? Did you leave an eyecatcher there?
Such a facility as you want would be highly useful in analyzing memory leaks. Related question: In C, the P=malloc(length); call returns a pointer. I can later free(P); without providing a length. Somehow the RTL remembers it. Is there any interface to query that originally requested length? It could be useful in a subsequent strncpy(P,...). -- gil ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [email protected] with the message: INFO IBM-MAIN
