Boost logo

Boost :

Subject: Re: [boost] [process] GSoc proposal
From: Stewart, Robert (Robert.Stewart_at_[hidden])
Date: 2010-04-05 13:58:30

Kasra wrote:
> Are there any volunteering mentors?

I have only some comments based upon what you presented here:

> class process
> {
> static process& this_process();


> static std::vector<process> processes(const
> std::string& machine);

That implies network communication to retrieve a list of processes from remote systems, right? That seems out of scope.

> static std::vector<process> processes_by_name(const
> std::string& name);
> static std::vector<process> processes_by_name(const
> std::string& name, const std::string& machine_name);

Without the machine overload of processes(), these two can be renamed "processes."

> const id& get_id() const throw();


> void terminate(bool kill = false );

bool is a bad argument type for that use. An enumerated type makes the function argument be something with a self-documenting name. That is, p.terminate(false) means don't terminate? Then why call the function?

I presume that function throws if unable to terminate the process?

> affinity_type processor_affinity() const throw();
> void processor_affinity(const affinity_type& affinity);

Is there another affinity to disambiguate? If not, s/processor_affinity/affinity/.

> boost::posix_time::time_duration kernel_time() const;
> boost::posix_time::time_duration user_time() const;
> boost::posix_time::time_duration total_time() const;

Wouldn't those be better combined into a single function that returns a tuple?

> const void* max_working_set() const;
> void max_working_set(const void* value);
> const void* min_working_set() const;
> void min_working_set(const void* value);
> uintmax_t peak_paged_memory() const;
> uintmax_t peak_private_memory() const;
> uintmax_t peak_virtual_memory() const;
> uintmax_t peak_working_memory() const;
> uintmax_t paged_system_memory() const;
> uintmax_t paged_memory() const;
> uintmax_t private_memory() const;
> uintmax_t virtual_memory() const;
> uintmax_t working_memory() const;

Are those really questions for a process class or for a memory manager class to which a process is passed?

Rob Stewart robert.stewart_at_[hidden]
Software Engineer, Core Software using std::disclaimer;
Susquehanna International Group, LLP

IMPORTANT: The information contained in this email and/or its attachments is confidential. If you are not the intended recipient, please notify the sender immediately by reply and immediately delete this message and all its attachments. Any review, use, reproduction, disclosure or dissemination of this message or any attachment by an unintended recipient is strictly prohibited. Neither this message nor any attachment is intended as or should be construed as an offer, solicitation or recommendation to buy or sell any security or other financial instrument. Neither the sender, his or her employer nor any of their respective affiliates makes any warranties as to the completeness or accuracy of any of the information contained herein or that this message or any of its attachments is free of viruses.

Boost list run by bdawes at, gregod at, cpdaniel at, john at