This library allows users to allocate different amounts of memory as fast kernel buffers for use as ethernet buffers and as task control structures. The default allocation by the ROM may not be sufficient, and the use of multiple processes and multiple sockets might combine to drain all kernel memory. This library allows you to increase that amount for more complex applications.
There are two ways to use this library. 1) When using init_rom: Call kmem_install before calling init_rom.
2) When using the individual initialization functions: The function kmem_init is meant to replace the function init_km from the initialization library.
For detailed information on the DS80C400 please see the High-Speed Microcontroller User's Guide: DS80C400 Supplement.
The functions in this library are multi-process safe--that is, if you call the same method from two different processes at the same time, the parameters to the function will not be destroyed. However, the function kmem_init is a system initialization function and should only be called once before the process scheduler is active.
Go to the source code of this file.
Defines | |
| #define | ROM400_KMEM_VERSION 5 |
| #define | ROM400_KMEM_MODEL_SMALLEST 1 |
| #define | ROM400_KMEM_MODEL_LARGEST 11 |
Functions | |
| unsigned char | kmem_init (unsigned char MODEL) |
| Initializes the kernel buffers. | |
| unsigned int | kmem_version (void) |
| Returns the version number of this KMEM library. | |
| void | kmem_install (unsigned char MODEL) |
| Installs the kmem library. | |
|
|
The largest value of the argument to be passed to kmem_init.
|
|
|
The smallest value of the argument to be passed to kmem_init.
|
|
|
Version number associated with this header file. Should be the same as the version number returned by the kmem_version function.
|
|
|
Initializes the kernel buffers. Allows user applications to specify the amount of kernel memory that will be available to the system. Kernel memory is used internally for Ethernet buffers and task control structures, and as such can limit the number of processes or sockets an application can use concurrently if there is not enough kernel buffer space. The default kernel buffer allocation given by the ROM is:
By calling this function, the count of kernel buffers is multiplied by the value MODEL. Note that while ROM400_KMEM_MODEL_LARGEST is the largest amount of kernel memory that the system can support, few applications will need to go beyond ROM400_KMEM_MODEL_SMALLEST + 2.
|
|
|
Installs the kmem library. This function must be called before init_rom. Allows user applications to specify the amount of kernel memory that will be available to the system. Kernel memory is used internally for Ethernet buffers and task control structures, and as such can limit the number of processes or sockets an application can use concurrently if there is not enough kernel buffer space. The default kernel buffer allocation given by the ROM is:
By calling this function, the count of kernel buffers is multiplied by the value MODEL. Note that while ROM400_KMEM_MODEL_LARGEST is the largest amount of kernel memory that the system can support, few applications will need to go beyond ROM400_KMEM_MODEL_SMALLEST + 2.
|
|
|
Returns the version number of this KMEM library.
|
| Copyright 2004 Dallas Semiconductor, Inc.. | Documentation generated by Doxygen. |