On Thu, 28 May 2020 13:21:06 +0100 "Burakov, Anatoly" <anatoly.bura...@intel.com> wrote:
> On 25-May-20 1:37 AM, Dmitry Kozlyuk wrote: > > Code in Linux EAL that supports dynamic memory allocation (as opposed to > > static allocation used by FreeBSD) is not OS-dependent and can be reused > > by Windows EAL. Move such code to a file compiled only for the OS that > > require it. > > > > Signed-off-by: Dmitry Kozlyuk <dmitry.kozl...@gmail.com> > > --- > > I believe you forgot to add dynmem to Makefile. Right, thanks. > > > +eal_dynmem_calc_num_pages_per_socket( > > + uint64_t *memory, struct hugepage_info *hp_info, > > + struct hugepage_info *hp_used, unsigned int num_hp_info) > > +{ > > + unsigned int socket, j, i = 0; > > + unsigned int requested, available; > > + int total_num_pages = 0; > > + uint64_t remaining_mem, cur_mem; > > + uint64_t total_mem = internal_config.memory; > > + > > + if (num_hp_info == 0) > > + return -1; > > + > > + /* if specific memory amounts per socket weren't requested */ > > + if (internal_config.force_sockets == 0) { > > + size_t total_size; > > + int cpu_per_socket[RTE_MAX_NUMA_NODES]; > > + size_t default_size; > > + unsigned int lcore_id; > > Comparing code from eal_memory.c and this one, it seems like you've > dropped all 32-bit code from this function. Is that intentional? No, it's a mistake. -- Dmitry Kozlyuk