> On Nov. 8, 2016, 4:56 p.m., Jason Lowe-Power wrote:
> > src/sim/system.hh, line 543
> > <http://reviews.gem5.org/r/3681/diff/1/?file=63244#file63244line543>
> >
> >     Can this just be an std::set<int>? This is only used to make sure there 
> > are no duplicates, right?
> 
> Brandon Potter wrote:
>     Why is the std::set<int> preferred over std::array<bool>?
>     
>     Yes, it's used to figure out which PIDs are available and which have 
> already been claimed by other processes.

I think a std::set<int> is much more clear as to what it is tracking, and it is 
simpler to access in many cases (e.g., it has a size() function).

Plus, it's smaller. If you only have 1 PID (the most common case), then you 
only have a single entry in the set, comparted to 32768... well, it could be 
bits, but likely it's at least chars. I can't find any information as to the 
implementation of std::array<bool>.


- Jason


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://reviews.gem5.org/r/3681/#review9027
-----------------------------------------------------------


On Nov. 7, 2016, 9:56 p.m., Brandon Potter wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://reviews.gem5.org/r/3681/
> -----------------------------------------------------------
> 
> (Updated Nov. 7, 2016, 9:56 p.m.)
> 
> 
> Review request for Default.
> 
> 
> Repository: gem5
> 
> 
> Description
> -------
> 
> Changeset 11703:9a6631ad6f41
> ---------------------------
> syscall_emul: [patch 14/22] adds identifier system calls
> 
> This changeset add fields to the process object and adds the following
> three system calls: setpgid, gettid, getpid.
> 
> 
> Diffs
> -----
> 
>   src/sim/syscall_emul.cc 4a86763c0b30cccba0f56c7f48637a46a4663b06 
>   src/sim/system.hh 4a86763c0b30cccba0f56c7f48637a46a4663b06 
>   src/arch/x86/linux/process.cc 4a86763c0b30cccba0f56c7f48637a46a4663b06 
>   src/sim/Process.py 4a86763c0b30cccba0f56c7f48637a46a4663b06 
>   src/sim/process.hh 4a86763c0b30cccba0f56c7f48637a46a4663b06 
>   src/sim/process.cc 4a86763c0b30cccba0f56c7f48637a46a4663b06 
>   src/sim/syscall_emul.hh 4a86763c0b30cccba0f56c7f48637a46a4663b06 
> 
> Diff: http://reviews.gem5.org/r/3681/diff/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Brandon Potter
> 
>

_______________________________________________
gem5-dev mailing list
gem5-dev@gem5.org
http://m5sim.org/mailman/listinfo/gem5-dev

Reply via email to