Skip to content

Commit

Permalink
revert some sync changes
Browse files Browse the repository at this point in the history
  • Loading branch information
michaeloffner committed Jul 7, 2017
1 parent 8010d4c commit 39b528d
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ public synchronized Class<?> loadClass(String name, byte[] barr) throws Unmodifi
return _loadClass(name, barr);
}

private Class<?> _loadClass(String name, byte[] barr) {
private synchronized Class<?> _loadClass(String name, byte[] barr) {
size+=barr.length;
// class not exists yet
try {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ public synchronized Class<?> loadClass(String name, byte[] barr) throws Unmodifi
return _loadClass(name, barr);
}

private Class<?> _loadClass(String name, byte[] barr) {
private synchronized Class<?> _loadClass(String name, byte[] barr) {
Class<?> clazz = defineClass(name,barr,0,barr.length);
if (clazz != null) {
loadedClasses.add(name);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
public class MemoryControler {
private final static Map<String,MemoryType> types=new HashMap<String, MemoryType>();
private static boolean init;
public static void init(ConfigServer cs){
public synchronized static void init(ConfigServer cs){
if(init) return;
// set level
for (MemoryPoolMXBean pool : ManagementFactory.getMemoryPoolMXBeans()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -170,15 +170,15 @@ public void setClassName(String className) {
this.className = className;
}

public int registerKey(LitString lit) {
synchronized (keys) {
public synchronized int registerKey(LitString lit) {
//synchronized (keys) {
int index = keys.indexOf(lit);
if(index!=-1)return index;// calls the toString method of litString

keys.add(lit);

return keys.size()-1;
}
//}
}

public List<LitString> getKeys() {
Expand Down

0 comments on commit 39b528d

Please sign in to comment.