Replace exit() by sys.exit()

Signed-off-by: Malahal Naineni <malahal@us.ibm.com>
Check for return value from sysconf (coverity reported)

Also, alloca doesn't return any failure indication, so removed checks
for NULL return value.

Signed-off-by: Malahal Naineni <malahal@us.ibm.com>
Signed-off-by: Thomas Favre-Bulle <thomas.favre-bulle@bull.net>