fos with dynamic alloc and shared res