[erlang-questions] mmap file to binary
Sverker Eriksson
sverker@REDACTED
Fri Apr 9 18:40:56 CEST 2010
Tony Rogvall wrote:
>>> Still the orig_bytes must be change. There are not to many places in the VM that uses the fact
>>> that orig_bytes is not a pointer, so the change should not be hard (if it's not done already ;-)
>>>
>>>
>> I haven't understood: is the problem with orig_bytes now?
>>
>
>
> Well... OTP team? ;-)
>
>
No, orig_bytes is still an array, but I don't think you need to change
that. You could instead use the pointer 'bytes' in ProcBin to point to
your mmap'ed data.
typedef struct proc_bin {
Eterm thing_word; /* Subtag REFC_BINARY_SUBTAG. */
Uint size; /* Binary size in bytes. */
struct proc_bin *next; /* Pointer to next ProcBin. */
Binary *val; /* Pointer to Binary structure. */
byte *bytes; /* Pointer to the actual data bytes. */
Uint flags; /* Flag word. */
} ProcBin;
/Sverker, Erlang/OTP
More information about the erlang-questions
mailing list