From 661ede4b335253f568126a6c6ce99c640aef8026 Mon Sep 17 00:00:00 2001 From: shatty Date: Sat, 5 Oct 2002 05:17:59 +0000 Subject: [PATCH] improved comments git-svn-id: file:///srv/svn/repos/haiku/trunk/current@1379 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- .../drivers/audio/echo/generic/OsSupportBeOS.cpp | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/src/add-ons/kernel/drivers/audio/echo/generic/OsSupportBeOS.cpp b/src/add-ons/kernel/drivers/audio/echo/generic/OsSupportBeOS.cpp index 6641d648fb..79d6724432 100644 --- a/src/add-ons/kernel/drivers/audio/echo/generic/OsSupportBeOS.cpp +++ b/src/add-ons/kernel/drivers/audio/echo/generic/OsSupportBeOS.cpp @@ -96,6 +96,11 @@ void OsAllocateInit() // //=========================================================================== +// OsAllocateNonPaged is used to (surprise!) allocate non-paged memory. Non-paged +// memory is defined as memory that is always physically resident - that is, the virtual +// memory manager won't swap this memory to disk. Nonpaged memory can be accessed +// from the interrupt handler. +// Nonpaged memory has no particular requirements on address alignment. ECHOSTATUS OsAllocateNonPaged ( @@ -264,6 +269,11 @@ ECHOSTATUS COsSupport::OsSnooze // //--------------------------------------------------------------------------- +// COsSupport::OsPageAllocate is used for allocating memory that is read and written by +// the DSP. This means that any memory allocated by OsPageAllocate must be nonpaged +// and should be aligned on at least a 32 byte address boundary. It must be aligned on at +// least a 4 byte boundary. + ECHOSTATUS COsSupport::OsPageAllocate ( DWORD dwPageCt, // How many pages to allocate @@ -346,7 +356,8 @@ PVOID COsSupport::operator new( size_t Size ) { PVOID pMemory; - // not from our pool since that may not be around yet + // it's probably better to not rtm alloc this + // but it does need to be resident pMemory = rtm_alloc(NULL,Size); if ( NULL == pMemory )