[dpdk-dev] questions about Windows basic memory management patch
Thomas Monjalon
thomas at monjalon.net
Mon Apr 6 15:24:26 CEST 2020
06/04/2020 14:37, Dmitry Kozlyuk:
> > Lastly, in the patch you implemented functions that were common for Linux and FreeBSD and in order to use them in Windows (e.g. eal_file_truncate that replaced ftruncate) and you got a duplicate code for Linux and FreeBSD, how can we solve this duplication ?
>
> In v2 I'm going to create lib/librte_eal/posix subdirectory and move such
> code there. I expect more code to end up there eventually, for example,
> dynamic library loading. This possibility was among motivations for EAL
> directory split.
Indeed it was the motivation.
I think /unix/ is a better directory name than /posix/
Maybe I'm wrong but I had the feeling some interfaces are common
between Linux and FreeBSD while not part of POSIX standard.
Comments are welcome to help taking the right decision.
> There're another duplication that worries me: copy & paste from Linux EAL in
> eal_malloc.c and eal_memory.c initialization. However, it this can't be
> helped, I'd rather leave it be for now and reconsider it when implementing
> advanced memory management.
There are a lot of copy/paste in EAL which can be refactored.
Any help here is welcome.
More information about the dev
mailing list