Solved

Contiguous Memory Allocation

Posted on 2001-06-29
3
5,791 Views
Last Modified: 2013-12-03
Is there any API available in windows which allow you to allocate a fixed block of memory(say 100K) contiguously in RAM and reserve it for me(i.e, No data movement and virtual memory management).
0
Comment
Question by:Chandra V
3 Comments
 
LVL 5

Expert Comment

by:robpitt
ID: 6238329
Maybe - it depends on what you mean.

A memory page (which is 4K) can be in one of three states
1) Free.
2) Reserved for your use.
3) Commited to storage.

This is controlled via the VirtualAlloc/VirtualFree functions (Search MSDN for details).


*however*


If what your really trying to do is allocate non-paged memory then the short answer is "NO, you can't do this".

0
 
LVL 32

Accepted Solution

by:
jhance earned 50 total points
ID: 6242977
>>If what your really trying to do is allocate non-paged memory then the short answer is "NO, you can't
do this".

True for a user program.  If you really need to do this, the place to accomplish it is in a DEVICE DRIVER using the DDK.  

I guess my question is why do you want to do this?  If it's for the typical reason, i.e. supporting a hardware device, then you should be writing a device driver anyway.
0
 
LVL 7

Expert Comment

by:peterchen092700
ID: 6256787
I'm yet another guy with the same question: why do you want to do this?

0

Featured Post

Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this article, I will show how to use the Ribbon IDs Tool Window to assign the built-in Office icons to a ribbon button.  This tool will help us to find the OfficeImageId that corresponds to our desired built-in Office icon. The tool is part of…
zlib is a free compression library (a DLL) on which the popular gzip utility is built.  In this article, we'll see how to use the zlib functions to compress and decompress data in memory; that is, without needing to use a temporary file.  We'll be c…
This tutorial gives a high-level tour of the interface of Marketo (a marketing automation tool to help businesses track and engage prospective customers and drive them to purchase). You will see the main areas including Marketing Activities, Design …
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question