> On 8/15/07, Rafael J. Wysocki <[EMAIL PROTECTED]> wrote: > > > You can malloc as much as you wish at initialization directly into > > > the pointers... I just don't understand what may go wrong if you do > > > this... > > > > Nothing, really. I prefer to have two global pointers and one contiguous > > memory area than to have five global pointers and five different memory > > areas. > > > > The problem is, we need to allocate all memory during the initialization, > > because allocating memory later on may easily fail. Now, it doesn't matter > > too much if we take it in one piece or in several pieces. > > Well... I tried to make this code more maintainable... > But now when you say that your personal preferences is to make so > complex code, I kind of giving up... > Maybe (AND JUST MAYBE AS I DON'T BELIEVE IN IT) in kernel you hack > these stuff... > But in user mode you need to make your code as readable as you > can...
suspend runs pagelocked, and iirc there are reasons for that, like we can't do writeback to filesystems, so we can't allocate memory. Rafael is right, you need to do allocations upfront, and no, it is not his "personal preference". Pavel -- (english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html ------------------------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/ _______________________________________________ Suspend-devel mailing list Suspend-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/suspend-devel