This packages exports a memory abstract class and a concrete subclass implemented as a lisp array of unsigned bytes. License: AGPL3 Copyright Pascal J. Bourguignon 2004 - 2012 This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program. If not, see <http://www.gnu.org/licenses/>
(base memory) |
generic-function |
Minimum value for an address in the given memory.
(dump memory address length &key byte-size stream margin) |
generic-function |
Print on the STREAM the contents of the MEMORY from the ADDRESS for LENGTH bytes of bit size BYTE-SIZE.
memory |
class |
An abstract memory.
Class precedence list: MEMORY STANDARD-OBJECT T
Class init args: BASE SIZE
(memory-epilog memory) |
generic-function |
This function is called after accessing the memory, so that any unlocking for shared memories may be implemented. An alternative is to override MEMORY-OPERATE.
(memory-operate memory thunk) |
generic-function |
This function is called to access the memory, so that any locking/unlocking for shared memories may be implemented. The default method just calls the THUNK. Any specialization of this function must funcall THUNK or CALL-NEXT-METHOD. An alternative is to override MEMORY-PROLOG and MEMORY-EPILOG.
(memory-prolog memory) |
generic-function |
This function is called before accessing the memory, so that any locking for shared memories may be implemented. An alternative is to override MEMORY-OPERATE.
memory-vector-64 |
class |
A 64-bit memory.
Class precedence list: MEMORY-VECTOR-64 MEMORY STANDARD-OBJECT T
Class init args: BASE SIZE
(peek-uint16 memory address) |
generic-function |
RETURN: The 16-bit byte at the given ADDRESS of the MEMORY.
(peek-uint32 memory address) |
generic-function |
RETURN: The 32-bit byte at the given ADDRESS of the MEMORY.
(peek-uint64 memory address) |
generic-function |
RETURN: The 64-bit byte at the given ADDRESS of the MEMORY.
(peek-uint8 memory address) |
generic-function |
RETURN: The 8-bit byte at the given ADDRESS of the MEMORY.
(poke-uint16 memory address value) |
generic-function |
DO: Store the 16-bit VALUE into the given ADDRESS of the MEMORY.
(poke-uint32 memory address value) |
generic-function |
DO: Store the 32-bit VALUE into the given ADDRESS of the MEMORY.
(poke-uint64 memory address value) |
generic-function |
DO: Store the 64-bit VALUE into the given ADDRESS of the MEMORY.
(poke-uint8 memory address value) |
generic-function |
DO: Store the 8-bit VALUE into the given ADDRESS of the MEMORY.
(size memory) |
generic-function |
Number of bytes this memory holds.
(valid-address-p memory address) |
generic-function |
RETURN: Whether ADDRESS is a valid address of the MEMORY.
(with-memory memory &body body) |
macro |
Protects access to the memory, giving the memory object a chance to set signal handler, or to acquire locks, and then release them.