Exetools  

Go Back   Exetools > General > General Discussion

Notices

Reply
 
Thread Tools Display Modes
  #1  
Old 04-14-2005, 17:17
nikola nikola is offline
Friend
 
Join Date: Jan 2004
Location: Your head
Posts: 115
Rept. Given: 0
Rept. Rcvd 0 Times in 0 Posts
Thanks Given: 0
Thanks Rcvd at 1 Time in 1 Post
nikola Reputation: 0
You can allocate with VirtualAlloc. If memory localtion you need is available you can specify location from which allocation should start. Why do you need a specific location?
Reply With Quote
  #2  
Old 04-14-2005, 17:43
redbull redbull is offline
Friend
 
Join Date: Mar 2004
Posts: 160
Rept. Given: 17
Rept. Rcvd 5 Times in 4 Posts
Thanks Given: 3
Thanks Rcvd at 6 Times in 6 Posts
redbull Reputation: 5
Hi Nikola,

Thanks for the correct info !!

I need to be able to allocate static memory because I dont want to make major changes to my code generation routines until I am sure that the rest of my ideas are going to work.
Reply With Quote
  #3  
Old 04-15-2005, 02:56
bollygud
 
Posts: n/a
Code:

PUSH 40
PUSH 3000
PUSH 1000
PUSH 3B40000
CALL kernel32.VirtualAlloc

stack:

03B40000  |Address = 03B40000
00001000  |Size = 1000 (4096.)
00003000  |AllocationType = MEM_COMMIT|MEM_RESERVE
00000040  \Protect = PAGE_EXECUTE_READWRITE
this will allocate 0x1000 bytes at 03B40000 ONLY IF memory isn't being used by something else.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Allocating BSTR strings in IE9 r00t General Discussion 4 01-31-2013 12:47
VirtualAlloc fails on specific memory address MarkusO General Discussion 7 01-22-2006 18:11


All times are GMT +8. The time now is 17:50.


Always Your Best Friend: Aaron, JMI, ahmadmansoor, ZeNiX, chessgod101
( Since 1998 )