MCPcopy Create free account
hub / github.com/badvision/jace / setMemory

Method setMemory

src/main/java/jace/core/Computer.java:102–117  ·  view source on GitHub ↗
(RAM memory)

Source from the content-addressed store, hash-verified

100 }
101
102 final public void setMemory(RAM memory) {
103 if (this.memory != memory) {
104 RAM oldMemory = this.memory;
105 if (oldMemory != null) {
106 oldMemory.detach();
107 }
108 this.memory = memory;
109 if (memory != null) {
110 if (oldMemory != null) {
111 memory.copyFrom(oldMemory);
112 oldMemory.detach();
113 }
114 memory.attach();
115 }
116 }
117 }
118
119 public void waitForNextCycle() {
120 //@TODO IMPLEMENT TIMER SLEEP CODE!

Callers 1

reconfigureMethod · 0.80

Calls 3

detachMethod · 0.95
copyFromMethod · 0.45
attachMethod · 0.45

Tested by

no test coverage detected