The NCR script has grown beyond one page (4KB). Since malloc() returns contiguous memory in virtual space, but doesn't guarantee any particular physical layout of pages, the script may be not contguous in physical memory. This made the first write command fail in very rare cases. This has been fixed by checking the region returned by malloc() for being contiguous, but there should be a physical memory allocate and later mapping to virtual memory instead.
The NCR script has grown beyond one page (4KB). Since malloc() returns
contiguous memory in virtual space, but doesn't guarantee any particular
physical layout of pages, the script may be not contguous in physical
memory. This made the first write command fail in very rare cases.
This has been fixed by checking the region returned by malloc() for
being contiguous, but there should be a physical memory allocate
and later mapping to virtual memory instead.

A few assertions and error messages are improved.

jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase