Sponsored Content
Operating Systems Linux SuSE max number of slabs per kernel module (kernel 2.6.17, suse) Post 302160984 by Brendan Kennedy on Wednesday 23rd of January 2008 08:40:30 AM
Old 01-23-2008
eh, ye tcp to ethernet... I wouldn't say I'm an expert or anything.

As regards to free pages - they may tend to stay available in the short term but they do eventually get reclaimed. I would agree it's not immediate though.

Thanks, I'll read your reference when I get my hands on the book!
 

4 More Discussions You Might Find Interesting

1. Linux

How to convert Linux Kernel built-in module into a loadable module

Hi all, I am working on USB data monitoring on Fedora Core 9. Kernel 2.6.25 has a built-in module (the one that isn't loadable, but compiles and links statically with the kernel during compilation) to snoop USB data. It is in <kernel_source_code>/drivers/usb/mon/. I need to know if I can... (0 Replies)
Discussion started by: anitemp
0 Replies

2. IP Networking

kernel module

Hi All, I need to develop a kernel module which changes the IP address of a package according to its mac address. It would be a sort of L2 Nat. Somebody know if I can do this using netfilter?? Thanks. (2 Replies)
Discussion started by: lagigliaivan
2 Replies

3. Linux

kernel module parameters

Hi, if I install a module with specific parameter, will this parameters applied next time system boots? for exampe, I want to disable InterruptThrottleRate modprobe e1000e InterruptThrottleRate=0 Is this parameter apllied only for this run, or this module will always use this parameter when... (2 Replies)
Discussion started by: Shedon
2 Replies

4. Linux

Unload kernel module at boot time (Debian Wheezy 7.2, 3.2.0-4-686-pae kernel)

Hi everyone, I am trying to prevent the ehci_hcd kernel module to load at boot time. Here's what I've tried so far: 1) Add the following line to /etc/modprobe.d/blacklist.conf (as suggested here): 2) Blacklisted the module by adding the following string to 3) Tried to blacklist the module... (0 Replies)
Discussion started by: gacanepa
0 Replies
Tcl_Preserve(3) 					      Tcl Library Procedures						   Tcl_Preserve(3)

__________________________________________________________________________________________________________________________________________________

NAME
Tcl_Preserve, Tcl_Release, Tcl_EventuallyFree - avoid freeing storage while it is being used SYNOPSIS
#include <tcl.h> Tcl_Preserve(clientData) Tcl_Release(clientData) Tcl_EventuallyFree(clientData, freeProc) ARGUMENTS
ClientData clientData (in) Token describing structure to be freed or reallocated. Usually a pointer to memory for structure. Tcl_FreeProc *freeProc (in) Procedure to invoke to free clientData. _________________________________________________________________ DESCRIPTION
These three procedures help implement a simple reference count mechanism for managing storage. They are designed to solve a problem having to do with widget deletion, but are also useful in many other situations. When a widget is deleted, its widget record (the structure hold- ing information specific to the widget) must be returned to the storage allocator. However, it is possible that the widget record is in active use by one of the procedures on the stack at the time of the deletion. This can happen, for example, if the command associated with a button widget causes the button to be destroyed: an X event causes an event-handling C procedure in the button to be invoked, which in turn causes the button's associated Tcl command to be executed, which in turn causes the button to be deleted, which in turn causes the button's widget record to be de-allocated. Unfortunately, when the Tcl command returns, the button's event-handling procedure will need to reference the button's widget record. Because of this, the widget record must not be freed as part of the deletion, but must be retained until the event-handling procedure has finished with it. In other situations where the widget is deleted, it may be possible to free the widget record immediately. Tcl_Preserve and Tcl_Release implement short-term reference counts for their clientData argument. The clientData argument identifies an object and usually consists of the address of a structure. The reference counts guarantee that an object will not be freed until each call to Tcl_Preserve for the object has been matched by calls to Tcl_Release. There may be any number of unmatched Tcl_Preserve calls in effect at once. Tcl_EventuallyFree is invoked to free up its clientData argument. It checks to see if there are unmatched Tcl_Preserve calls for the object. If not, then Tcl_EventuallyFree calls freeProc immediately. Otherwise Tcl_EventuallyFree records the fact that clientData needs eventually to be freed. When all calls to Tcl_Preserve have been matched with calls to Tcl_Release then freeProc will be called by Tcl_Release to do the cleanup. All the work of freeing the object is carried out by freeProc. FreeProc must have arguments and result that match the type Tcl_FreeProc: typedef void Tcl_FreeProc(char *blockPtr); The blockPtr argument to freeProc will be the same as the clientData argument to Tcl_EventuallyFree. The type of blockPtr (char *) is dif- ferent than the type of the clientData argument to Tcl_EventuallyFree for historical reasons, but the value is the same. When the clientData argument to Tcl_EventuallyFree refers to storage allocated and returned by a prior call to Tcl_Alloc, ckalloc, or another function of the Tcl library, then the freeProc argument should be given the special value of TCL_DYNAMIC. This mechanism can be used to solve the problem described above by placing Tcl_Preserve and Tcl_Release calls around actions that may cause undesired storage re-allocation. The mechanism is intended only for short-term use (i.e. while procedures are pending on the stack); it will not work efficiently as a mechanism for long-term reference counts. The implementation does not depend in any way on the internal structure of the objects being freed; it keeps the reference counts in a separate structure. SEE ALSO
Tcl_Interp, Tcl_Alloc KEYWORDS
free, reference count, storage Tcl 7.5 Tcl_Preserve(3)
All times are GMT -4. The time now is 02:42 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy