-
Notifications
You must be signed in to change notification settings - Fork 177
Introduce PRISM_HAS_MMAP macro
#2420
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
@hasumikin I think |
a7211de to
c37d69e
Compare
|
@kddnewton |
|
Thanks @hasumikin you should be able to rebase now and it should be fixed. My feedback on the PR, is that I think we should keep |
|
I'm also happy to make those changes after we merge this if you'd prefer. No problem! 😀 |
If I didn't get you wrong, we'd better create one in addition to How about /* pm_string.h */
typedef struct {
(......)
/** The type of the string. This field determines how the string should be freed. */
enum {
(......)
/** This string owns its memory, and should be freed using `pm_string_free`. */
PM_STRING_OWNED,
/** This is a general string, and should be taken care of by the user. */
PM_STRING_GENERAL, // 👈
#ifdef PRISM_HAS_MMAP
/** This string is a memory-mapped file, and should be freed using `pm_string_free`. */
PM_STRING_MAPPED
#endif
} type;
} pm_string_t; |
…e is available in the target platform
a78dd20 to
84b3c29
Compare
|
Actually I realize now it should simply return a |
|
Thank you for the contribution! |
This is to know if the memory map interface is available in the target platform by using
_POSIX_MAPPED_FILESand_WIN32ref #2217