I understand you are having problems with the Intel® HD Graphics 4000 and the shared memory in the system.
Please note that the use shared memory that is taken from the RAM memory installed on your computer.
The feature that sets the amount of memory that is used for video is called Intel(R) Dynamic Video Memory Technology and this will make the graphics controller only to use the amount of RAM memory that it requires to run the different applications or software's. I’m afraid that there is no way to preset this to a specific value, you can only limit the maximum memory that it can take. You will see this option usually in BIOS and you will have 3 options, 128MB, 256MB and maximum DVMT. Other values can be found as 512MB, etc but this depends on the motherboard manufacturer and the amount of RAM memory installed on your computer.
Please note that also, depending in the system manufacturer they may lock some options in the BIOS for users, so if these options are not in the BIOS the best option will be to contact HP in your case, and request if possible to have this enabled.