FWIW I use HEAPCHK as part of the standard regression testing of a product written in C++. I don't notice the performance impact while the product is running (but that is a very subjective "don't notice" -- I have made no attempt to measure the impact because I don't really care about the performance of one test). I use RPTSTG(ON) as part of the same test and one of them really slows down termination: a product termination that normally is essentially instantaneous takes perhaps 30 seconds. I do a lot of delete's at that point so perhaps it is HEAPCHK that slows things down.
//CEEOPTS DD * RPTSTG(ON) HEAPCHK(ON,1,0,10,10,1024,0) /* HEAPZONE sounds useful. A similar feature is the default in MS Visual Studio (where I do my alpha testing -- and I suspect similarly in things like Eclipse). It works great. If you allocate 27 bytes and use 28, then on the free() or delete C++ asserts. You tend to find buffer overruns shortly after they happen, rather than down the road when all sorts of seemingly unrelated things start misbehaving. Charles -----Original Message----- From: IBM Mainframe Discussion List [mailto:IBM-MAIN@LISTSERV.UA.EDU] On Behalf Of Lizette Koehler Sent: Monday, December 02, 2013 6:15 AM To: IBM-MAIN@LISTSERV.UA.EDU Subject: Re: HEAPCHECK and HEAPZONE difference in zOS 2.1 Miklos, I found HEAPCHK in z/OS Language Environment Customization HEAPCHK Derivation: HEAP storage CHecKing Use HEAPCHK to run additional heap check tests. If HEAPCHK(ON) is used with STORAGE(,heap_free_value), the free areas of the heap will also be checked. If HEAPCHK(ON) is specified, this will result in a performance degradation due to the additional error checking that is performed. A U4042 abend dump will be generated when an error is detected, but no CEEDUMP will be produced. And for HEAPZONE I found in z/OS Language Environment Programming Reference Derivation: HEAP check ZONES The HEAPZONES runtime option is used to turn on overlay toleration and checking for user heaps. When activated, the runtime option affects any obtained storage that can be controlled by the HEAP or HEAP64 runtime options. HEAPZONES also affects storage obtained from a heap pool. A heap check zone is an additional piece of storage that is appended to an allocated element during a storage request. The size of the check zone depends on the size31 and size64 suboptions of HEAPZONES. The check zone can be examined for overlays when the heap element is freed. So it looks that HEAPCHK has a performance overhead and validates heaps of (I think) all HEAPS and the other a runtime option to provide overly toleration and check for USER heaps. ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN