nn::socket::GetRequiredMemorySize Function
size_t GetRequiredMemorySize(
size_t bufferSizeForSockets,
s32 maxSessions
);
| Name | Description | |
|---|---|---|
| in | bufferSizeForSockets | Number specified to the Initialize argument of the same name. |
| in | maxSessions | Number specified to the Initialize argument of the same name. |
Gets the minimum amount of working memory required to initialize the socket library.
The working region is used to allocate the AddrInfo values returned by the GetAddrInfo function, but it is also used temporarily during function calls. Because this size value is calculated with some extra space reserved, you do not usually need to be concerned about what points in time the working region is being used.
However, the required memory size does sometimes exceed the value returned by this function. This can happen, for example, if you get an AddrInfo value with the GetAddrInfo function, and then call GetAddrInfo again without using the FreeAddrInfo function to free the AddrInfo value first.
CONFIDENTIAL