Hi Ray,


Thanks,
Chao
On 2023/12/19 14:29, Ni, Ray wrote:
Plan B:
It only returns the attribute and length of the first part, leaving it up to the caller to decide to look for the next part.
I'm leaning toward plan B, what do you think?
I like plan B as well. Do you think that "EndAddress" can be removed from the param list?

Imaging from caller perspective, the code can be like follows:
BaseAddress = 0;
While (TRUE) {
  GetMemoryRegionAttributes (
    BaseAddress,
    &Length,
    &Attributes
  );
  If (Length == 0) {
    Break;
  }
  // dump BaseAddress, Length, Attributes
  BaseAddress += Length;
}

Cool, one more question:

Do you mean the "Length" parameter will have both in/out properties?


    
_._,_._,_

Groups.io Links:

You receive all messages sent to this group.

View/Reply Online (#112700) | | Mute This Topic | New Topic
Your Subscription | Contact Group Owner | Unsubscribe [rebecca@openfw.io]

_._,_._,_