Hi,
I've created a function that fills a linked list containing blocks of
1024kB and a pointer to the next node.
my struct is something like this:
typedef struct _Buffer {
UINT64 Len; //By default 1024*1024
UINT64 *InitialAddress; //Pointer to the the 1024K buffer
struct _Buffer *Next; //Pointer to the next buffer container
} Buffer;
I started allocating a pointer to my struct called Buffer (I expect it
consumes about 24 Bytes on a X86_64 architecture).
Status = EfiBootServices->AllocatePool(EfiBootServicesData,
sizeof(Buffer),
(VOID**) &FirstNode);
Then I allocated a new pointer containing about 1024KB and I was expecting
something like a contiguous address in relation to my previous allocated
struct.
Status = EfiBootServices->AllocatePool(EfiBootServicesData,
SIZE_ONE_MB,
(VOID**) &InitAddress);
But what I found was a address pointing to a different region in memory
(eg. struct address = 0x6B563598, 1024K buffer address = 0x6A51E018 or
address = 0x6B1A7C98, 1024K buffer address = 0x507018 in forward nodes)
which is not contiguous.
There is a especific algorithm on UDK for memory allocation or it is
something that each manufacturer decides what to use? There is some
documentation that I can read to understand this behavior?
Thank you,
Fernando
------------------------------------------------------------------------------
Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more!
Discover the easy way to master current and previous Microsoft technologies
and advance your career. Get an incredible 1,500+ hours of step-by-step
tutorial videos with LearnDevNow. Subscribe today and save!
http://pubads.g.doubleclick.net/gampad/clk?id=58041391&iu=/4140/ostg.clktrk
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/edk2-devel