Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


alloc less bytes

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General Gamehacking
View previous topic :: View next topic  
Author Message
wayden
Cheater
Reputation: 0

Joined: 09 Dec 2020
Posts: 27

PostPosted: Wed Jul 26, 2023 10:37 am    Post subject: alloc less bytes Reply with quote

Hi,
I wanted to know if it's possible to alloc less than 4096 bytes ?
i already tried
Code:

alloc(Mem_PointerStats,$300,GameAssembly.dll+C49B24)

but in memoryview 4096 are "accessible" like doing
Code:

alloc(Mem_PointerStats,$1000,GameAssembly.dll+C49B24)

and it's annoying since i don't need that much space
Back to top
View user's profile Send private message
ParkourPenguin
I post too much
Reputation: 152

Joined: 06 Jul 2014
Posts: 4706

PostPosted: Wed Jul 26, 2023 10:59 am    Post subject: Reply with quote

No. Memory is organized into pages where each page is 0x1000 (4096) bytes. That's the lowest amount of memory that's possible to allocate in an address space.
_________________
I don't know where I'm going, but I'll figure it out when I get there.
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 470

Joined: 09 May 2003
Posts: 25807
Location: The netherlands

PostPosted: Wed Jul 26, 2023 11:29 am    Post subject: Reply with quote

Additional fun fact, in windows you'd lose 64KB of virtual memory even if you just allocate 4KB
_________________
Do not ask me about online cheats. I don't know any and wont help finding them.

Like my help? Join me on Patreon so i can keep helping
Back to top
View user's profile Send private message MSN Messenger
wayden
Cheater
Reputation: 0

Joined: 09 Dec 2020
Posts: 27

PostPosted: Thu Jul 27, 2023 4:03 am    Post subject: Reply with quote

Alright then im just gonna alloc a mainmem and define from here, thanks for the answers
Back to top
View user's profile Send private message
Csimbi
I post too much
Reputation: 97

Joined: 14 Jul 2007
Posts: 3327

PostPosted: Thu Jul 27, 2023 4:14 am    Post subject: Reply with quote

Dark Byte wrote:
Additional fun fact, in windows you'd lose 64KB of virtual memory even if you just allocate 4KB

Whaaaat? lol
Back to top
View user's profile Send private message
ParkourPenguin
I post too much
Reputation: 152

Joined: 06 Jul 2014
Posts: 4706

PostPosted: Thu Jul 27, 2023 12:03 pm    Post subject: Reply with quote

Not all 64 KiB is resident in physical memory. It's just that windows can only allocate memory on a 64 KiB boundary.
Ever notice how every VirtualAlloc always starts at an address ending in `0000`?

_________________
I don't know where I'm going, but I'll figure it out when I get there.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> General Gamehacking All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites