Solved

Contiguous Memory Allocation

Posted on 2001-06-29
3
5,798 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Salesforce Has Never Been Easier

Improve and reinforce salesforce training & adoption using WalkMe's digital adoption platform. Start saving on costly employee training by creating fast intuitive Walk-Thrus for Salesforce. Claim your Free Account Now

Question has a verified solution.

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

Suggested Solutions

This article shows how to make a Windows 7 gadget that accepts files dropped from the Windows Explorer.  It also illustrates how to give your gadget a non-rectangular shape and how to add some nifty visual effects to text displayed in a your gadget.…
A theme is a collection of property settings that allow you to define the look of pages and controls, and then apply the look consistently across pages in an application. Themes can be made up of a set of elements: skins, style sheets, images, and o…
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…
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial

752 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