Re: [PATCH 1/3] Adds a read-only "procs" file similar to "tasks" that shows only unique tgids

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, Jul 12, 2009 at 11:46 PM, Li Zefan<lizf@xxxxxxxxxxxxxx> wrote:
> I think a better demonstration is:
>
>  $ cat tasks
>  1000
>  1001
>  1002
>
>  $ cat procs
>  1000

Indeed.

>> +     /*
>> +      * if the length difference is large enough, we want to allocate a
>> +      * smaller buffer to save memory. if this fails due to out of memory,
>> +      * we'll just stay with what we've got.
>> +      */
>> +     if (PIDLIST_REALLOC_DIFFERENCE(length, dest)) {
>> +             newlist = kmalloc(dest * sizeof(pid_t), GFP_KERNEL);
>
> krealloc()
>

Ah yes. I had thought about krealloc and determined that it wasn't
clever enough to do in-place resizing, but forgot that it could be
used anyway here.
_______________________________________________
Containers mailing list
Containers@xxxxxxxxxxxxxxxxxxxxxxxxxx
https://lists.linux-foundation.org/mailman/listinfo/containers


[Index of Archives]     [Cgroups]     [Netdev]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux