A user needs a function which calculates how much heap memory is available in the executable version of a C++ program. When the program is loaded to run and is started, the first procedure called will...


A user needs a function which calculates how much heap memory is available in the executable version of a C++ program. When the program is loaded to run and is started, the first procedure called will be that function. The function itself will execute the new operator to acquire chunks of memory until the heap is completely occupied, i.e. exhausted. Also, during the process of acquiring heap memory, the function will keep track of the amount of heap in bytes that it is acquiring. When the function has acquired all of the heap memory that it finds available, it will display the count of bytes which it has acquired. For this problem please write a small driver main program whose sole purpose is to execute the function which counts and reports the bytes which it finds available in the calling program's heap.. Also, please write the small byte-counting function.


@font-face {font-family:"Cambria Math"; panose-1:2 4 5 3 5 4 6 3 2 4; mso-font-charset:0; mso-generic-font-family:roman; mso-font-pitch:variable; mso-font-signature:3 0 0 0 1 0;}@font-face {font-family:Calibri; panose-1:2 15 5 2 2 2 4 3 2 4; mso-font-charset:0; mso-generic-font-family:swiss; mso-font-pitch:variable; mso-font-signature:-469750017 -1073732485 9 0 511 0;}p.MsoNormal, li.MsoNormal, div.MsoNormal {mso-style-unhide:no; mso-style-qformat:yes; mso-style-parent:""; margin:0in; mso-pagination:widow-orphan; font-size:12.0pt; font-family:"Calibri",sans-serif; mso-ascii-font-family:Calibri; mso-ascii-theme-font:minor-latin; mso-fareast-font-family:Calibri; mso-fareast-theme-font:minor-latin; mso-hansi-font-family:Calibri; mso-hansi-theme-font:minor-latin; mso-bidi-font-family:Arial; mso-bidi-theme-font:minor-bidi;}.MsoChpDefault {mso-style-type:export-only; mso-default-props:yes; font-family:"Calibri",sans-serif; mso-ascii-font-family:Calibri; mso-ascii-theme-font:minor-latin; mso-fareast-font-family:Calibri; mso-fareast-theme-font:minor-latin; mso-hansi-font-family:Calibri; mso-hansi-theme-font:minor-latin; mso-bidi-font-family:Arial; mso-bidi-theme-font:minor-bidi;}div.WordSection1 {page:WordSection1;}
Mar 04, 2021
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions ยป

Submit New Assignment

Copy and Paste Your Assignment Here