tech-kern archive

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

malloc(9) alignment (was: Re: CVS commit: src/sys/external/bsd/drm/dist/bsd-core) said:
> the problem ist malloc(9) does not return page aligned memory as kmem
> does now, for allocations >= PAGE_SIZE and that break drm mmap

I see. drm wants both alignment semantics and a realloc().
Since it is 3rd party stuff, it sucks to add NetBSD specific
modifications and workaround.

Wouldn't make it most sense to either give malloc(9) its old
alignment semantics back, or revert it to the old code?
I'd assume that performance critical code in NetBSD has
switched to kmem_alloc anyway, and the remaining uses are
mostly legacy and 3rd party code. Breaking alignment
assumptions in that code shortly before a release branch
is quite dangerous. And forcing it to convert to kmem_alloc
in a hurry isn't much better.

best regards

Forschungszentrum Juelich GmbH
52425 Juelich
Sitz der Gesellschaft: Juelich
Eingetragen im Handelsregister des Amtsgerichts Dueren Nr. HR B 3498
Vorsitzender des Aufsichtsrats: MinDir Dr. Karl Eugen Huthmacher
Geschaeftsfuehrung: Prof. Dr. Achim Bachem (Vorsitzender),
Karsten Beneke (stellv. Vorsitzender), Prof. Dr.-Ing. Harald Bolt,
Prof. Dr. Sebastian M. Schmidt

Kennen Sie schon unsere app?

Home | Main Index | Thread Index | Old Index