lkml.org 
[lkml]   [2000]   [Jul]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: tty cleanup
Hi,

On Fri, Jun 30, 2000 at 12:14:21AM +0200, Rogier Wolff wrote:
>
> Theodore Y. Ts'o wrote:
> > + if (PAGE_SIZE != N_TTY_BUF_SIZE) {
> > + p = kmalloc(N_TTY_BUF_SIZE, prio);
>
> Last I looked (about two or three years ago), kmallocing 4096 bytes on
> a 8192-byte-page machine would allocate you a full page.

The slab allocator is neat, though. It is capable of storing the
descriptor information for allocated blocks in a separate structure,
so that power-of-two allocations can now be handled _much_ more
efficiently. The slab allocator can deal with PAGE_SIZE allocations
without having to resort to higher-order get_free_page calls, for
example.

Given that kmalloc currently uses the slab allocator, kmalloc(4096)
shouldn't be a problem any more.

Cheers,
Stephen

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:57    [W:0.031 / U:2.516 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site